mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-27 19:06:23 +02:00
Merge pull request 'Adds version number to settings and general UI fixes/tweaks' (#27) from show-version-number into XC-ios-ht
Reviewed-on: https://git.743378673.xyz/MeloNX/MeloNX/pulls/27
This commit is contained in:
commit
61fca7892f
12 changed files with 77 additions and 28 deletions
|
@ -728,6 +728,8 @@
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
);
|
);
|
||||||
GCC_OPTIMIZATION_LEVEL = z;
|
GCC_OPTIMIZATION_LEVEL = z;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
@ -910,6 +912,10 @@
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = "$(VERSION)";
|
MARKETING_VERSION = "$(VERSION)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
||||||
|
@ -1018,6 +1024,8 @@
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
);
|
);
|
||||||
GCC_OPTIMIZATION_LEVEL = z;
|
GCC_OPTIMIZATION_LEVEL = z;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
@ -1200,6 +1208,10 @@
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
|
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = "$(VERSION)";
|
MARKETING_VERSION = "$(VERSION)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
||||||
|
|
Binary file not shown.
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<array/>
|
|
||||||
</plist>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -96,8 +96,8 @@ struct GameInfoSheet: View {
|
||||||
.navigationTitle(game.titleName)
|
.navigationTitle(game.titleName)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .navigationBarTrailing) {
|
ToolbarItem(placement: .cancellationAction) {
|
||||||
Button("Done") {
|
Button("Dismiss") {
|
||||||
presentationMode.wrappedValue.dismiss()
|
presentationMode.wrappedValue.dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,26 +239,28 @@ struct GameLibraryView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Library Section
|
// Library Section
|
||||||
VStack(alignment: .leading) {
|
if !filteredGames.isEmpty {
|
||||||
Text("Library")
|
VStack(alignment: .leading) {
|
||||||
.font(.headline)
|
Text("Library")
|
||||||
.foregroundColor(.primary)
|
.font(.headline)
|
||||||
.padding(.horizontal)
|
.foregroundColor(.primary)
|
||||||
.padding(.top)
|
.padding(.horizontal)
|
||||||
|
.padding(.top)
|
||||||
ForEach(filteredGames) { game in
|
|
||||||
GameListRow(
|
ForEach(filteredGames) { game in
|
||||||
game: game,
|
GameListRow(
|
||||||
startemu: $startemu,
|
game: game,
|
||||||
games: games,
|
startemu: $startemu,
|
||||||
isViewingGameInfo: $isViewingGameInfo,
|
games: games,
|
||||||
isSelectingGameUpdate: $isSelectingGameUpdate,
|
isViewingGameInfo: $isViewingGameInfo,
|
||||||
isSelectingGameDLC: $isSelectingGameDLC,
|
isSelectingGameUpdate: $isSelectingGameUpdate,
|
||||||
gameRequirements: $gameRequirements,
|
isSelectingGameDLC: $isSelectingGameDLC,
|
||||||
gameInfo: $gameInfo
|
gameRequirements: $gameRequirements,
|
||||||
)
|
gameInfo: $gameInfo
|
||||||
.padding(.horizontal, 3)
|
)
|
||||||
.padding(.vertical, 8)
|
.padding(.horizontal, 3)
|
||||||
|
.padding(.vertical, 8)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -93,6 +93,15 @@ struct SettingsView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var appVersion: String {
|
||||||
|
guard let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String else {
|
||||||
|
return "Unknown"
|
||||||
|
}
|
||||||
|
return version
|
||||||
|
}
|
||||||
|
|
||||||
|
@FocusState private var isArgumentsKeyboardVisible: Bool
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
iOSNav {
|
iOSNav {
|
||||||
ZStack {
|
ZStack {
|
||||||
|
@ -145,6 +154,7 @@ struct SettingsView: View {
|
||||||
}
|
}
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
}
|
}
|
||||||
|
.scrollDismissesKeyboardIfAvailable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationTitle("Settings")
|
.navigationTitle("Settings")
|
||||||
|
@ -189,6 +199,14 @@ struct SettingsView: View {
|
||||||
Text("\(memoryText) RAM")
|
Text("\(memoryText) RAM")
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
|
|
||||||
|
Text("·")
|
||||||
|
.font(.subheadline)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
|
||||||
|
Text("Version \(appVersion)")
|
||||||
|
.font(.subheadline)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Device cards
|
// Device cards
|
||||||
|
@ -747,7 +765,7 @@ struct SettingsView: View {
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
|
|
||||||
if #available(iOS 15.0, *) {
|
if #available(iOS 15.0, *) {
|
||||||
TextField("Separate arguments with commas", text: Binding(
|
TextField("Separate arguments with commas" ,text: Binding(
|
||||||
get: {
|
get: {
|
||||||
config.additionalArgs.joined(separator: ", ")
|
config.additionalArgs.joined(separator: ", ")
|
||||||
},
|
},
|
||||||
|
@ -762,6 +780,14 @@ struct SettingsView: View {
|
||||||
.textInputAutocapitalization(.none)
|
.textInputAutocapitalization(.none)
|
||||||
.disableAutocorrection(true)
|
.disableAutocorrection(true)
|
||||||
.padding(.vertical, 4)
|
.padding(.vertical, 4)
|
||||||
|
.toolbar {
|
||||||
|
ToolbarItem(placement: .keyboard) {
|
||||||
|
Button("Dismiss") {
|
||||||
|
isArgumentsKeyboardVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.focused($isArgumentsKeyboardVisible)
|
||||||
} else {
|
} else {
|
||||||
TextField("Separate arguments with commas", text: Binding(
|
TextField("Separate arguments with commas", text: Binding(
|
||||||
get: {
|
get: {
|
||||||
|
@ -1013,6 +1039,7 @@ struct CategoryButton: View {
|
||||||
RoundedRectangle(cornerRadius: 12)
|
RoundedRectangle(cornerRadius: 12)
|
||||||
.fill(isSelected ? Color.blue.opacity(0.15) : Color.clear)
|
.fill(isSelected ? Color.blue.opacity(0.15) : Color.clear)
|
||||||
)
|
)
|
||||||
|
.animation(.bouncy(duration: 0.3), value: isSelected)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1122,3 +1149,16 @@ struct InfoCard: View {
|
||||||
.cornerRadius(8)
|
.cornerRadius(8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this code is used to enable the keyboard to be dismissed when scrolling if available on iOS 16+
|
||||||
|
extension View {
|
||||||
|
@ViewBuilder
|
||||||
|
func scrollDismissesKeyboardIfAvailable() -> some View {
|
||||||
|
if #available(iOS 16.0, *) {
|
||||||
|
self.scrollDismissesKeyboard(.interactively)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue