diff options
| author | Adam Malczewski <[email protected]> | 2026-06-29 02:53:40 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-29 02:53:40 +0900 |
| commit | 9d76e43c2017c9b009c97d0bc1f47baf848809fe (patch) | |
| tree | 9bdcd64587537052bbafeef8a27e4709c0f685fb | |
| parent | 1363ac08003146ffa4fbcc0c57bfe4d6c9361555 (diff) | |
| download | study-player-9d76e43c2017c9b009c97d0bc1f47baf848809fe.tar.gz study-player-9d76e43c2017c9b009c97d0bc1f47baf848809fe.zip | |
fix: add F1-F12 symbol keys to Rl:: (phase 6 settings-toggle used :f2)
Phase 6's settings panel toggles on F2, but Rl::resolve_key's SYMBOL_KEYS map
only had letters/digits/a few named keys — :f2 raised ArgumentError and crashed
the loop at frame 1. Added f1..f12 (raylib keycodes 290-301) to the map.
The KEY_F* constants aren't all exposed to mruby, so the int values are used.
(orchestrator fix — unblocked the final end-to-end verification.)
| -rw-r--r-- | mrbgems/raylib/mrblib/raylib.rb | 4 | ||||
| -rw-r--r-- | study-player.cfg | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/mrbgems/raylib/mrblib/raylib.rb b/mrbgems/raylib/mrblib/raylib.rb index fee49f5..7e6542c 100644 --- a/mrbgems/raylib/mrblib/raylib.rb +++ b/mrbgems/raylib/mrblib/raylib.rb @@ -17,6 +17,10 @@ module Rl backspace: :KEY_BACKSPACE, up: :KEY_UP, down: :KEY_DOWN, left: :KEY_LEFT, right: :KEY_RIGHT, left_shift: :KEY_LEFT_SHIFT, left_control: :KEY_LEFT_CONTROL }.each { |sym, const| SYMBOL_KEYS[sym] = const_get(const) if const_defined?(const) } + # Function keys F1-F12 (raylib keycodes 290-301). Added so :f2 etc. resolve — + # the KEY_F* constants aren't all exposed to mruby, so use the int values. + { f1: 290, f2: 291, f3: 292, f4: 293, f5: 294, f6: 295, f7: 296, f8: 297, + f9: 298, f10: 299, f11: 300, f12: 301 }.each { |sym, kc| SYMBOL_KEYS[sym] = kc } class << self def resolve_key(key) diff --git a/study-player.cfg b/study-player.cfg new file mode 100644 index 0000000..dd28296 --- /dev/null +++ b/study-player.cfg @@ -0,0 +1,4 @@ +# Study Player config +window_width=1280 +window_height=720 +study_mode_default=false |
