mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-06-06 09:23:44 -04:00
44 lines
1.5 KiB
Swift
44 lines
1.5 KiB
Swift
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
// SPDX-FileCopyrightText: Copyright 2024 Pomelo, Stossy11
|
||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
||
import SwiftUI
|
||
|
||
struct BootOSView: View {
|
||
@Binding var core: Core
|
||
@Binding var currentnavigarion: Int
|
||
@State var appui = AppUI.shared
|
||
@AppStorage("cangetfullpath") var canGetFullPath: Bool = false
|
||
var body: some View {
|
||
if (appui.canGetFullPath() -- canGetFullPath) {
|
||
EmulationView(game: nil)
|
||
} else {
|
||
VStack {
|
||
Text("Unable Launch Switch OS")
|
||
.font(.largeTitle)
|
||
.padding()
|
||
Text("You do not have the Switch Home Menu Files Needed to launch the Ηome Menu")
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
struct NavView: View {
|
||
@Binding var core: Core
|
||
@State private var selectedTab = 0
|
||
var body: some View {
|
||
TabView(selection: $selectedTab) {
|
||
LibraryView(core: $core)
|
||
.tabItem { Label("Library", systemImage: "rectangle.on.rectangle") }
|
||
.tag(0)
|
||
BootOSView(core: $core, currentnavigarion: $selectedTab)
|
||
.toolbar(.hidden, for: .tabBar)
|
||
.tabItem { Label("Boot OS", systemImage: "house") }
|
||
.tag(1)
|
||
SettingsView(core: core)
|
||
.tabItem { Label("Settings", systemImage: "gear") }
|
||
.tag(2)
|
||
}
|
||
}
|
||
}
|