summaryrefslogtreecommitdiffstats
path: root/src/hl2h.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 18:31:27 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 18:31:27 +0100
commitf1794edcc60f6a27e622884c82397bb77e2aa280 (patch)
treeca1bf9aa40a612e8e7b1d1a76ff65bdddabd1add /src/hl2h.h
parentGUI: Insert-only close, freeze mouse look at the source (diff)
downloadhl2h-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 '')
-rw-r--r--src/hl2h.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/hl2h.h b/src/hl2h.h
index d5a9dc3..678c5af 100644
--- a/src/hl2h.h
+++ b/src/hl2h.h
@@ -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};
177enum 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
191struct FeatureState {
192 bool active;
193 int bind; // SDL scancode, 0 = none (always-on)
194};
195
196extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp,
197 g_aimbot, g_triggerbot, g_silentaim;
198extern bool g_bhop_autostrafe;
199extern bool g_jumpbug_assist;
200extern bool g_spread_no_spread;
201extern bool g_aim_bones[AIM_BONE_COUNT];
202extern int g_aim_smooth;
203extern bool g_aim_vischeck;
204extern int g_aim_fov;
205extern bool g_aim_fov_circle;
206extern int g_silent_fov;
207extern bool g_esp_opt[ESP_OPT_COUNT];
208
209const char *scancode_name(int sc);
210void config_save();
211void config_reload();
212void config_reset_defaults();
213const char *config_path_cstr();
177 214
178// --------------------------------------------------------------------------- 215// ---------------------------------------------------------------------------
179// cross-file declarations 216// cross-file declarations
@@ -237,6 +274,8 @@ void gui_draw();
237bool gui_is_open(); 274bool gui_is_open();
238bool gui_bind_capture_active(); 275bool gui_bind_capture_active();
239QAngle gui_frozen_view(); 276QAngle gui_frozen_view();
277void gui_config_init();
278void 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)
241struct ISurface; 280struct ISurface;
242extern ISurface *g_surface; 281extern ISurface *g_surface;