diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 18:53:32 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 18:53:32 +0100 |
| commit | 6b5425ebd35c28e20680f5f28c887b705827ba1c (patch) | |
| tree | 9b9c4b74c597b4d225e65a04e8812de784d91f01 /src/cinput.cpp | |
| parent | GUI: fix footer clipping; remove the old text menu (diff) | |
| download | hl2h-6b5425ebd35c28e20680f5f28c887b705827ba1c.tar.gz hl2h-6b5425ebd35c28e20680f5f28c887b705827ba1c.zip | |
GUI: add on-screen toasts and atomic config writes
- Toast queue drawn in the top-right by the overlay, independent of the GUI
being open. Info/warn/error colors and 6/9/12 s lifetimes; timers start on
the first painted frame so startup messages are not missed.
- Queue a load toast after install_menu, plus warnings/errors for missing
modules/interfaces/netvars, input hooks, fonts, ISurface, server datamap,
and spread seed support.
- Toast on config reload, reset, bind/unbind and config save failure.
- Config saves now write `config.tmp`, flush, then rename it over the real
file; failures leave the previous config intact.
- config_load reports whether a file was found so Reload can distinguish a
successful reload from a missing file.
- Update CONTEXT and ISURFACE_STATUS for the single GUI, toasts and atomic
config writes.
Diffstat (limited to '')
| -rw-r--r-- | src/cinput.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cinput.cpp b/src/cinput.cpp index ad7face..f466c53 100644 --- a/src/cinput.cpp +++ b/src/cinput.cpp | |||
| @@ -228,7 +228,8 @@ bool find_input_global() { | |||
| 228 | logf("CInput* = %#lx (ptr var %#lx, vfunc[3] %#lx)", (unsigned long)input, | 228 | logf("CInput* = %#lx (ptr var %#lx, vfunc[3] %#lx)", (unsigned long)input, |
| 229 | (unsigned long)var, (unsigned long)f3); | 229 | (unsigned long)var, (unsigned long)f3); |
| 230 | g_input = input; | 230 | g_input = input; |
| 231 | install_input_hook(); | 231 | if (!install_input_hook()) |
| 232 | toastf(TOAST_ERROR, "Input vtable hook failed; features disabled"); | ||
| 232 | return true; | 233 | return true; |
| 233 | } | 234 | } |
| 234 | } | 235 | } |
