From f1794edcc60f6a27e622884c82397bb77e2aa280 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 18:31:27 +0100 Subject: GUI: wire real feature state and config Replace the dummy preview controls with the actual settings: - cards bind directly to the feature state and the existing option variables; Active/Bind now drive the same gates as the text menu; - every feature persists active+bind, including movement, melee and spread; - config path and build info are real; Reload config re-reads the INI; - Reset defaults is two-click, restores feature settings/binds and keeps the GUI layout; - window position, category and expanded cards persist under [gui] in the same config file; layout saves on drag/category/expand/close; - mouse bind capture handles all five buttons and consumes the click so it cannot re-arm immediately; - Active/Bind tooltips and full scancode names. The old text tree stays on F1 for one verification pass. --- CONTEXT.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 6f6e59e..0cb05c5 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -100,8 +100,9 @@ Bind rows enter bind-select mode: press a key/button to assign, `Escape` sets None (always-on), `Enter` cancels. > The text menu below is being replaced by the GUI described in the next -> section. The old tree is kept only until the GUI reaches parity. During the -> preview, **Insert** toggles the GUI and the old text tree is on **F1**. +> section. The GUI now drives the same feature state/config. The old tree is +> kept only for a verification pass; **Insert** toggles the GUI and the old +> text tree is on **F1**. ``` HL2hake @@ -156,17 +157,24 @@ Binds use SDL scancodes; mouse buttons are pseudo-scancodes 600..604. and ESP/FOV circle/speed graph keep drawing. No invulnerability. - **Native cursor**: on open, leave SDL relative-mouse mode and show the OS cursor; restore on close. Absolute mouse coordinates are used. -- **Bind capture**: click Bind, press a key/button; Esc cancels capture but - does not close the GUI; clicking elsewhere cancels; Clear sets None; Insert - is reserved for the GUI. +- **Bind capture**: click Bind, press a key or any mouse button; Esc cancels + capture but does not close the GUI; the small x clears the bind (None = + always-on). Insert is reserved for the GUI. - **UI scale**: `clamp(min(screen_w/1920, screen_h/1080), 0.75, 1.5)`; base window 960x620, body/title fonts 15/20 px at scale 1. - Every feature gets Active + Bind; bind None means always-on. -- System page: config path/build info, Reload config, and a two-click Reset - that restores feature settings/binds but keeps GUI layout. +- System page: real config path/build info, Reload config (re-reads the INI), + and a two-click Reset that restores feature settings/binds but keeps GUI + layout. - Window: fixed-size, draggable by title bar, clamped to screen, position, - category and expanded cards persisted under `[gui]`. Esc does not close the - GUI; the toggle key (Insert) is the only close path. There is no title-bar X. + category and expanded cards persisted under `[gui]` in the same INI. Esc + does not close the GUI; the toggle key (Insert) is the only close path. + There is no title-bar X. +- GUI controls write the same state the text tree used; sliders persist when + the drag ends, toggles/binds/layout persist immediately. `[gui]` stores + `x`, `y`, `category` and an `expanded` bitmask (card index order). Every + feature now persists an `active` and `bind` pair, including movement, melee + and spread. ## Bones / ESP -- cgit v1.2.3