summaryrefslogtreecommitdiffhomepage
path: root/game/study_player/ui/main.rml
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-29 21:33:52 +0900
committerAdam Malczewski <[email protected]>2026-06-29 21:33:52 +0900
commit5cf1e79c603c6fa00f331fa02449080d4a55bbc5 (patch)
treec2a65bac01672664982ee1225e39a28f65a02892 /game/study_player/ui/main.rml
parent9e0e06165fac96f11a9af0f46cfb66877fa5c103 (diff)
downloadstudy-player-rewrite.tar.gz
study-player-rewrite.zip
fix: study-mode checkbox wasn't visible or bound (wrong RmlUi flow)rewrite
The checkbox used data-value (binds the element's 'value' string attribute) instead of data-checked (binds the 'checked' bool state) -- per RmlUi docs, checkboxes must use data-checked with a bool. So it neither reflected nor toggled study_mode, and with no explicit styling it rendered invisibly. Fix: wrap the input in a <form> (canonical RmlUi form-control flow), switch data-value -> data-checked, and give #cb-study an explicit visible style (border + background, green fill when :checked). Verified the document loads with no RmlUi parse errors. Note: RmlUi's border shorthand is 'width color' (no 'solid' keyword).
Diffstat (limited to 'game/study_player/ui/main.rml')
-rw-r--r--game/study_player/ui/main.rml10
1 files changed, 6 insertions, 4 deletions
diff --git a/game/study_player/ui/main.rml b/game/study_player/ui/main.rml
index 821293e..f6bc5fe 100644
--- a/game/study_player/ui/main.rml
+++ b/game/study_player/ui/main.rml
@@ -57,10 +57,12 @@
<!-- ================================================================ -->
<div id="bottom-bar">
<div id="help-text">{{help_text}}</div>
- <div id="study-mode-box">
- <input type="checkbox" id="cb-study" data-value="study_mode"/>
- <span id="study-label">Study Mode</span>
- </div>
+ <form id="study-form">
+ <div id="study-mode-box">
+ <input type="checkbox" id="cb-study" data-checked="study_mode"/>
+ <span id="study-label">Study Mode</span>
+ </div>
+ </form>
</div>
<!-- ================================================================ -->