first git

This commit is contained in:
Rory Hinnen
2026-07-11 10:17:49 -05:00
parent a9edc96b1b
commit 917f11c55f
78 changed files with 3327 additions and 0 deletions
@@ -0,0 +1,60 @@
//
// ContentView.swift
// Interject!
//
// Created by Rory Hinnen on 21/11/18.
//
import SwiftUI
struct ContentView: View {
@EnvironmentObject var settings: Settings/Users/roryhinnen/Downloads/Dungeon Project
@EnvironmentObject var store: Store
@State var displaySettingsView: Bool = false
@State var preferredColorScheme: ColorScheme? = nil
var body: some View {
SentenceView()
.contentShape(Rectangle())
.padding()
.edgesIgnoringSafeArea(.all)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.contentShape(Rectangle())
.foregroundColor(Color("Foreground"))
.background(Color("Background"))
.gesture(DragGesture()
.onEnded { value in
let direction = value.detectDirection()
switch direction {
case .up:
settings.remove()
case .down:
settings.add()
default:
break
}
})
.toolbar {
ToolbarItemGroup(placement: .bottomBar) {
ToolbarView(displaySettingsView: $displaySettingsView)
.foregroundColor(Color("Foreground"))
}
}
.preferredColorScheme(settings.colorScheme.type)
.sheet(isPresented: $displaySettingsView) {
VStack {
SettingsView()
Button("Accept", action: {displaySettingsView.toggle()})
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
.environmentObject(Settings())
.environmentObject(Store())
}
}