Make Gesture a packed struct (#284)

This commit is contained in:
Nikolas 2025-09-11 19:24:15 +02:00
parent 651b37a025
commit 33f216d4fc
Failed to generate hash of commit
3 changed files with 37 additions and 27 deletions

View file

@ -56,7 +56,7 @@ pub fn main() anyerror!void {
// TODO: Update `title` state variables here!
// Press ENTER to change to `gameplay` state
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.tap)) {
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.{ .tap = true })) {
current_screen = .gameplay;
}
},
@ -64,7 +64,7 @@ pub fn main() anyerror!void {
// TODO: Update `gameplay` state variables here!
// Press ENTER to change to `ending` state
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.tap)) {
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.{ .tap = true })) {
current_screen = .ending;
}
},
@ -72,7 +72,7 @@ pub fn main() anyerror!void {
// TODO: Update `ending` state variables here!
// Press ENTER to return to `title` state
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.tap)) {
if (rl.isKeyPressed(.enter) or rl.isGestureDetected(.{ .tap = true })) {
current_screen = .title;
}
},