Compare commits
2 Commits
58cd083c2d
...
631c920eb6
| Author | SHA1 | Date | |
|---|---|---|---|
| 631c920eb6 | |||
| 113c8444c4 |
@ -1,4 +0,0 @@
|
||||
[tasks]
|
||||
build_web = "$HOME/bin/jai/bin/jai-linux first.jai - wasm release && rm -rf dist/packs/ && cp -r packs/ dist/ && rm dist/main.o"
|
||||
ship_web = "./game/ship_web.sh"
|
||||
start = "$HOME/bin/jai/bin/jai-linux first.jai && ./first"
|
||||
@ -127,7 +127,9 @@ handle_sokol_event :: (event: *sapp_event) {
|
||||
new_event.key_code = mapped;
|
||||
new_event.key_pressed = 1;
|
||||
add_modifier_info(event, *new_event);
|
||||
input_button_states[mapped] = .START | .DOWN;
|
||||
// OS key-repeat must not re-trigger START
|
||||
if event.key_repeat input_button_states[mapped] |= .DOWN;
|
||||
else input_button_states[mapped] = .START | .DOWN;
|
||||
case .KEY_UP;
|
||||
mapped := get_key_code(event.key_code);
|
||||
new_event.type = .KEYBOARD;
|
||||
|
||||
@ -103,6 +103,10 @@ is_action_start :: (action: $T) -> bool {
|
||||
return check_action(action, .START);
|
||||
}
|
||||
|
||||
is_action_stop :: (action: $T) -> bool {
|
||||
return check_action(action, .END);
|
||||
}
|
||||
|
||||
init_keybinds :: () {
|
||||
set_default_bindings();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user