mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Use cursors
This commit is contained in:
parent
04e7aaef88
commit
d56f34dc4e
2 changed files with 4 additions and 4 deletions
|
|
@ -21,10 +21,10 @@ export fn main() void {
|
||||||
if (uvm.getc()) |key| {
|
if (uvm.getc()) |key| {
|
||||||
switch(key) {
|
switch(key) {
|
||||||
' ' => nextEvent = mibu.events.Event{.key = .{.code = .{.char = ' '}}},
|
' ' => nextEvent = mibu.events.Event{.key = .{.code = .{.char = ' '}}},
|
||||||
'a' => nextEvent = mibu.events.Event{.key = .{.code = .left}},
|
0x44 => nextEvent = mibu.events.Event{.key = .{.code = .left}},
|
||||||
'd' => nextEvent = mibu.events.Event{.key = .{.code = .right}},
|
0x43 => nextEvent = mibu.events.Event{.key = .{.code = .right}},
|
||||||
'w' => nextEvent = mibu.events.Event{.key = .{.code = .up}},
|
0x41 => nextEvent = mibu.events.Event{.key = .{.code = .up}},
|
||||||
's' => nextEvent = mibu.events.Event{.key = .{.code = .down}},
|
0x42 => nextEvent = mibu.events.Event{.key = .{.code = .down}},
|
||||||
'q' => gameRunning = false,
|
'q' => gameRunning = false,
|
||||||
else => {},
|
else => {},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue