Add help view and refine AR tank placement
This commit is contained in:
@ -8,15 +8,30 @@
|
||||
import SwiftUI
|
||||
import ARKit
|
||||
|
||||
/// Zentraler Schlüssel für die LiDAR-Einstellung (in AppStorage/UserDefaults).
|
||||
/// Zentrale Schlüssel für AppStorage/UserDefaults.
|
||||
enum SettingsKeys {
|
||||
static let lidarFeaturesEnabled = "lidarFeaturesEnabled"
|
||||
static let arExposure = "arExposure"
|
||||
static let devTankResizingEnabled = "devTankResizingEnabled"
|
||||
}
|
||||
|
||||
/// Eine gespeicherte Entwickler-Option darf in Release niemals die Tankgröße ändern.
|
||||
enum TankResizePolicy {
|
||||
static func isEnabled(devFlag: Bool) -> Bool {
|
||||
#if DEBUG
|
||||
devFlag
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingsView: View {
|
||||
@AppStorage(SettingsKeys.lidarFeaturesEnabled) private var lidarEnabled = false
|
||||
@AppStorage(SettingsKeys.arExposure) private var arExposure = 1.0
|
||||
#if DEBUG
|
||||
@AppStorage(SettingsKeys.devTankResizingEnabled) private var devTankResizingEnabled = false
|
||||
#endif
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
|
||||
/// LiDAR ist verfügbar, wenn das Gerät Scene-Reconstruction (Mesh) unterstützt.
|
||||
@ -56,6 +71,22 @@ struct SettingsView: View {
|
||||
} footer: {
|
||||
Text("Passt die zusätzliche Beleuchtung der oberirdischen Tanks an. Änderungen greifen beim nächsten Start des AR-Modus.")
|
||||
}
|
||||
#if DEBUG
|
||||
Section {
|
||||
Toggle("Tankgröße per Geste ändern", isOn: $devTankResizingEnabled)
|
||||
} header: {
|
||||
Text("Entwicklung")
|
||||
} footer: {
|
||||
Text("Nur im Debug-Build verfügbar. Die Änderung greift beim nächsten Start des AR-Modus.")
|
||||
}
|
||||
#endif
|
||||
Section {
|
||||
NavigationLink {
|
||||
HelpView()
|
||||
} label: {
|
||||
Label("Hilfe", systemImage: "questionmark.circle")
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("Einstellungen")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
|
||||
Reference in New Issue
Block a user