diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 18:31:27 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 18:31:27 +0100 |
| commit | f1794edcc60f6a27e622884c82397bb77e2aa280 (patch) | |
| tree | ca1bf9aa40a612e8e7b1d1a76ff65bdddabd1add /src/hl2h.h | |
| parent | GUI: Insert-only close, freeze mouse look at the source (diff) | |
| download | hl2h-f1794edcc60f6a27e622884c82397bb77e2aa280.tar.gz hl2h-f1794edcc60f6a27e622884c82397bb77e2aa280.zip | |
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.
Diffstat (limited to 'src/hl2h.h')
| -rw-r--r-- | src/hl2h.h | 39 |
1 files changed, 39 insertions, 0 deletions
| @@ -174,6 +174,43 @@ enum EspOption { | |||
| 174 | ESP_OPT_SHOW_SPEEDGRAPH = 6, | 174 | ESP_OPT_SHOW_SPEEDGRAPH = 6, |
| 175 | ESP_OPT_COUNT = 7 | 175 | ESP_OPT_COUNT = 7 |
| 176 | }; | 176 | }; |
| 177 | enum AimBone { | ||
| 178 | AIM_BONE_HEAD = 0, | ||
| 179 | AIM_BONE_TORSO, | ||
| 180 | AIM_BONE_LARM, | ||
| 181 | AIM_BONE_RARM, | ||
| 182 | AIM_BONE_LLEG, | ||
| 183 | AIM_BONE_RLEG, | ||
| 184 | AIM_BONE_COUNT | ||
| 185 | }; | ||
| 186 | |||
| 187 | // --------------------------------------------------------------------------- | ||
| 188 | // feature state / settings (owned by menu.cpp until the text menu is removed) | ||
| 189 | // --------------------------------------------------------------------------- | ||
| 190 | |||
| 191 | struct FeatureState { | ||
| 192 | bool active; | ||
| 193 | int bind; // SDL scancode, 0 = none (always-on) | ||
| 194 | }; | ||
| 195 | |||
| 196 | extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, | ||
| 197 | g_aimbot, g_triggerbot, g_silentaim; | ||
| 198 | extern bool g_bhop_autostrafe; | ||
| 199 | extern bool g_jumpbug_assist; | ||
| 200 | extern bool g_spread_no_spread; | ||
| 201 | extern bool g_aim_bones[AIM_BONE_COUNT]; | ||
| 202 | extern int g_aim_smooth; | ||
| 203 | extern bool g_aim_vischeck; | ||
| 204 | extern int g_aim_fov; | ||
| 205 | extern bool g_aim_fov_circle; | ||
| 206 | extern int g_silent_fov; | ||
| 207 | extern bool g_esp_opt[ESP_OPT_COUNT]; | ||
| 208 | |||
| 209 | const char *scancode_name(int sc); | ||
| 210 | void config_save(); | ||
| 211 | void config_reload(); | ||
| 212 | void config_reset_defaults(); | ||
| 213 | const char *config_path_cstr(); | ||
| 177 | 214 | ||
| 178 | // --------------------------------------------------------------------------- | 215 | // --------------------------------------------------------------------------- |
| 179 | // cross-file declarations | 216 | // cross-file declarations |
| @@ -237,6 +274,8 @@ void gui_draw(); | |||
| 237 | bool gui_is_open(); | 274 | bool gui_is_open(); |
| 238 | bool gui_bind_capture_active(); | 275 | bool gui_bind_capture_active(); |
| 239 | QAngle gui_frozen_view(); | 276 | QAngle gui_frozen_view(); |
| 277 | void gui_config_init(); | ||
| 278 | void gui_config_write(FILE *f); | ||
| 240 | // ISurface pointer (defined in menu.cpp, used for drawing tests) | 279 | // ISurface pointer (defined in menu.cpp, used for drawing tests) |
| 241 | struct ISurface; | 280 | struct ISurface; |
| 242 | extern ISurface *g_surface; | 281 | extern ISurface *g_surface; |
