From 9d76e43c2017c9b009c97d0bc1f47baf848809fe Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Mon, 29 Jun 2026 02:53:40 +0900 Subject: fix: add F1-F12 symbol keys to Rl:: (phase 6 settings-toggle used :f2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.) --- mrbgems/raylib/mrblib/raylib.rb | 4 ++++ study-player.cfg | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 study-player.cfg 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 -- cgit v1.2.3