-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusts joystick behavior and menu positions to be compatible with PlayCase when enabled
- Loading branch information
Showing
19 changed files
with
293 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// GifImageView.swift | ||
// Ignited | ||
// | ||
// Created by Chris Rittenhouse on 9/10/24. | ||
// Copyright © 2024 LitRitt. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import WebKit | ||
|
||
struct GifImageView: UIViewRepresentable { | ||
private let name: String | ||
init(_ name: String) { | ||
self.name = name | ||
} | ||
|
||
func makeUIView(context: Context) -> WKWebView { | ||
let webview = WKWebView() | ||
let url = Bundle.main.url(forResource: name, withExtension: "gif")! | ||
let data = try! Data(contentsOf: url) | ||
webview.load(data, mimeType: "image/gif", characterEncodingName: "UTF-8", baseURL: url.deletingLastPathComponent()) | ||
webview.isOpaque = false | ||
webview.backgroundColor = .clear | ||
return webview | ||
} | ||
|
||
func updateUIView(_ uiView: WKWebView, context: Context) { | ||
uiView.reload() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// PlayCaseOptions.swift | ||
// Ignited | ||
// | ||
// Created by Chris Rittenhouse on 9/9/24. | ||
// Copyright © 2024 LitRitt. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
import Features | ||
|
||
struct PlayCaseOptions | ||
{ | ||
@Option(name: "Logo", | ||
description: "PlayCase is a phone case designed to enhance your mobile emulation experience by giving you physical buttons on top of your screen.", | ||
detailView: { _ in | ||
HStack { | ||
Image("PlayCaseLogo") | ||
.resizable() | ||
.aspectRatio(contentMode: .fit) | ||
Spacer() | ||
GifImageView("playcase") | ||
.frame(width: 70, height: 100, alignment: .center) | ||
} | ||
.frame(height: 100) | ||
.padding() | ||
.displayInline() | ||
}) | ||
var logo: Bool = false | ||
|
||
@Option(name: "Visit PlayCase", | ||
description: "Consider buying a PlayCase to support its creator, who strives to continue improving the product and provides excellent customer support!.", | ||
detailView: { _ in | ||
Button("Visit PlayCase") { | ||
UIApplication.shared.openWebpage(site: "https://playcase.gg") | ||
} | ||
.font(.system(size: 17, weight: .bold, design: .default)) | ||
.foregroundColor(.accentColor) | ||
.displayInline() | ||
}) | ||
var visitButton: Bool = false | ||
|
||
@Option(name: "Download Skins", | ||
description: "Tap here to download compatible skins from the PlayCase website.", | ||
detailView: { _ in | ||
Button("Download Skins") { | ||
UIApplication.shared.openWebpage(site: "https://playcase.gg/skins/") | ||
} | ||
.font(.system(size: 17, weight: .bold, design: .default)) | ||
.foregroundColor(.accentColor) | ||
.displayInline() | ||
}) | ||
var downloadSkins: Bool = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.