F043 — Config and Sound Controls
| Field | Value |
|---|---|
| ID | F043 |
| Phase | 3 — UI Controls |
| Jira | HEDGE-78, HEDGE-79 |
| Status | JS ✅ · TS ⬜ · UMA ✅ (2026-04-11) |
Business Rule
The game provides two persistent icon buttons rendered as HTML overlay elements outside the Phaser canvas:| Button | Class | Position | Action |
|---|---|---|---|
| Config (gear) | btnMenuLeft | Left of canvas, near top | Opens UIGameSettings modal (sound on/off toggles, spacebar, etc.) |
| Sound level | btnMenuRightThird | Left of canvas, near top | Cycles sound volume level (UI.SOUND.PLUS) |
| Info | btnMenuRightFirst | Right of canvas, near top | Opens UIInfo modal (help / paytable) |
#fugaGameUI, a zero-height HTML div positioned at the canvas bottom.
Layout Mechanism
The game (game.min.js) adds classdesktop to #fugaGame at boot. CSS in game.css then positions the buttons:
game.css does not supply bottom: 0. Without it, #fugaGameUI defaults to top: 0 and all buttons render at y = -702px — completely clipped by #fugaGame { overflow: hidden }.
Platform fix (index-live.html):
#fugaGameUI sits at the canvas bottom and the top: -702px buttons appear near the canvas top corners.
UIGameSettings Modal
btnMenuLeft fires UI.MODALTOGGLE "UIGameSettings", which opens the settings panel. The panel includes:
- Sound Music on/off (
UISoundMusicSetting) - Sound SFX on/off (
UISoundSFXSetting) - Spacebar spin toggle
- Double-up, turbo, cashier button enable/disable (suppressed via null in
SetDatapatch)
Sound Button Levels
btnSound is type: "multilevel" — each click fires UI.SOUND.PLUS, cycling through icon states (sound_icon_level_0 → _1 → _2 → _3). The level adjusts the GDK sound volume.
Acceptance Criteria
| # | Criterion | JS | TS | UMA |
|---|---|---|---|---|
| AC1 | Config gear button visible near top-left of canvas | ✅ | ⬜ | ✅ |
| AC2 | Sound button visible near top-left of canvas | ✅ | ⬜ | ✅ |
| AC3 | Info button visible near top-right of canvas | ✅ | ⬜ | ✅ |
| AC4 | Clicking config gear opens UIGameSettings modal | ✅ | ⬜ | ✅ |
| AC5 | Sound button cycles volume levels | ✅ | ⬜ | ⬜ (audio stub) |
| AC6 | Modal closes via return button | ✅ | ⬜ | ✅ |
Version Parity
| Version | Status | Notes |
|---|---|---|
| JS | ✅ Working | Full audio + config modal |
| TS | ⬜ Not implemented | HTML overlay buttons not yet added |
| UMA | ✅ Buttons visible (2026-04-11) | Config modal works; sound stub only (HEDGE-142) |
Related Features
- F022 — Card Display (canvas rendering, Phaser setup)
- HEDGE-78 — Menu and help screens
- HEDGE-79 — Config button
- HEDGE-142 — UMA sounds (sound button cycles levels but no audio yet)