Use cursors

This commit is contained in:
Toby Jaffey 2025-12-09 00:56:07 +00:00
parent 04e7aaef88
commit d56f34dc4e
2 changed files with 4 additions and 4 deletions

View file

@ -21,10 +21,10 @@ export fn main() void {
if (uvm.getc()) |key| {
switch(key) {
' ' => nextEvent = mibu.events.Event{.key = .{.code = .{.char = ' '}}},
'a' => nextEvent = mibu.events.Event{.key = .{.code = .left}},
'd' => nextEvent = mibu.events.Event{.key = .{.code = .right}},
'w' => nextEvent = mibu.events.Event{.key = .{.code = .up}},
's' => nextEvent = mibu.events.Event{.key = .{.code = .down}},
0x44 => nextEvent = mibu.events.Event{.key = .{.code = .left}},
0x43 => nextEvent = mibu.events.Event{.key = .{.code = .right}},
0x41 => nextEvent = mibu.events.Event{.key = .{.code = .up}},
0x42 => nextEvent = mibu.events.Event{.key = .{.code = .down}},
'q' => gameRunning = false,
else => {},
}

Binary file not shown.