mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-04-24 08:25:14 +00: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
@ -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",
|
||||
);
|
||||
GCC_OPTIMIZATION_LEVEL = z;
|
||||
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",
|
||||
);
|
||||
MARKETING_VERSION = "$(VERSION)";
|
||||
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",
|
||||
);
|
||||
GCC_OPTIMIZATION_LEVEL = z;
|
||||
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",
|
||||
);
|
||||
MARKETING_VERSION = "$(VERSION)";
|
||||
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)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
Button("Done") {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button("Dismiss") {
|
||||
presentationMode.wrappedValue.dismiss()
|
||||
}
|
||||
}
|
||||
|
@ -239,26 +239,28 @@ struct GameLibraryView: View {
|
||||
}
|
||||
|
||||
// Library Section
|
||||
VStack(alignment: .leading) {
|
||||
Text("Library")
|
||||
.font(.headline)
|
||||
.foregroundColor(.primary)
|
||||
.padding(.horizontal)
|
||||
.padding(.top)
|
||||
|
||||
ForEach(filteredGames) { game in
|
||||
GameListRow(
|
||||
game: game,
|
||||
startemu: $startemu,
|
||||
games: games,
|
||||
isViewingGameInfo: $isViewingGameInfo,
|
||||
isSelectingGameUpdate: $isSelectingGameUpdate,
|
||||
isSelectingGameDLC: $isSelectingGameDLC,
|
||||
gameRequirements: $gameRequirements,
|
||||
gameInfo: $gameInfo
|
||||
)
|
||||
.padding(.horizontal, 3)
|
||||
.padding(.vertical, 8)
|
||||
if !filteredGames.isEmpty {
|
||||
VStack(alignment: .leading) {
|
||||
Text("Library")
|
||||
.font(.headline)
|
||||
.foregroundColor(.primary)
|
||||
.padding(.horizontal)
|
||||
.padding(.top)
|
||||
|
||||
ForEach(filteredGames) { game in
|
||||
GameListRow(
|
||||
game: game,
|
||||
startemu: $startemu,
|
||||
games: games,
|
||||
isViewingGameInfo: $isViewingGameInfo,
|
||||
isSelectingGameUpdate: $isSelectingGameUpdate,
|
||||
isSelectingGameDLC: $isSelectingGameDLC,
|
||||
gameRequirements: $gameRequirements,
|
||||
gameInfo: $gameInfo
|
||||
)
|
||||
.padding(.horizontal, 3)
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
}
|
||||
}
|
||||
} 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 {
|
||||
iOSNav {
|
||||
ZStack {
|
||||
@ -145,6 +154,7 @@ struct SettingsView: View {
|
||||
}
|
||||
.padding(.bottom)
|
||||
}
|
||||
.scrollDismissesKeyboardIfAvailable()
|
||||
}
|
||||
}
|
||||
.navigationTitle("Settings")
|
||||
@ -189,6 +199,14 @@ struct SettingsView: View {
|
||||
Text("\(memoryText) RAM")
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
Text("·")
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
Text("Version \(appVersion)")
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
// Device cards
|
||||
@ -747,7 +765,7 @@ struct SettingsView: View {
|
||||
.foregroundColor(.primary)
|
||||
|
||||
if #available(iOS 15.0, *) {
|
||||
TextField("Separate arguments with commas", text: Binding(
|
||||
TextField("Separate arguments with commas" ,text: Binding(
|
||||
get: {
|
||||
config.additionalArgs.joined(separator: ", ")
|
||||
},
|
||||
@ -762,6 +780,14 @@ struct SettingsView: View {
|
||||
.textInputAutocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.padding(.vertical, 4)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .keyboard) {
|
||||
Button("Dismiss") {
|
||||
isArgumentsKeyboardVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
.focused($isArgumentsKeyboardVisible)
|
||||
} else {
|
||||
TextField("Separate arguments with commas", text: Binding(
|
||||
get: {
|
||||
@ -1013,6 +1039,7 @@ struct CategoryButton: View {
|
||||
RoundedRectangle(cornerRadius: 12)
|
||||
.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)
|
||||
}
|
||||
}
|
||||
|
||||
// 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…
x
Reference in New Issue
Block a user