This commit is contained in:
lizzie 2026-03-31 03:27:44 +00:00
parent c686e37b90
commit 81a92b4adb
26 changed files with 80 additions and 435 deletions

View file

@ -5,7 +5,7 @@
import SwiftUI
import GameController
import AppUI
import SwiftUIJoystick
struct ControllerView: View {
@ -335,6 +335,18 @@ struct ABXYView: View {
}
}
class Haptics {
static let shared = Haptics()
private init() { }
func play(_ feedbackStyle: UIImpactFeedbackGenerator.FeedbackStyle) {
print("haptics")
UIImpactFeedbackGenerator(style: feedbackStyle).impactOccurred()
}
func notify(_ feedbackType: UINotificationFeedbackGenerator.FeedbackType) {
UINotificationFeedbackGenerator().notificationOccurred(feedbackType)
}
}
struct ButtonView: View {
var button: VirtualControllerButtonType
@StateObject private var viewModel: EmulationViewModel = EmulationViewModel(game: nil)