Skip to content

Commit b3f8e31

Browse files
committed
added bytes view to user_input example for easier debugging
1 parent e1395c2 commit b3f8e31

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/user_input/main.odin

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ main :: proc() {
2121
t.move_cursor(&s, 0, 0)
2222
t.write(&s, "Press `Esc` to exit")
2323

24+
t.move_cursor(&s, 2, 0)
25+
t.writef(&s, "Bytes: %v", input)
26+
2427
kb_input, has_kb_input := t.parse_keyboard_input(input)
2528

26-
t.move_cursor(&s, 2, 0)
29+
t.move_cursor(&s, 4, 0)
2730
t.write(&s, "Keyboard: ")
2831
if has_kb_input && kb_input.key != .None {
2932
t.writef(&s, "%v", kb_input)
@@ -32,7 +35,7 @@ main :: proc() {
3235
}
3336

3437
mouse_input, has_mouse_input := t.parse_mouse_input(input)
35-
t.move_cursor(&s, 4, 0)
38+
t.move_cursor(&s, 6, 0)
3639
t.write(&s, "Mouse: ")
3740
if has_mouse_input {
3841
t.writef(&s, "%v", mouse_input)

0 commit comments

Comments
 (0)