From 0e9f3422e37d0b2d1344efec5ceb07c2246bfcd7 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 18:02:10 +0100 Subject: GUI: add F2 preview shell with dummy controls First vertical slice for the custom ISurface GUI: - window/sidebar/content shell with Movement, Combat, Visuals, Weapons and System categories; - cards with dummy Active/Bind, collapsible settings, toggles, sliders, buttons, bind capture, scrolling and tooltips; - native OS cursor by releasing SDL relative mode; reasserted while open; - F2 toggles the preview; Insert still opens the old text tree; - while the GUI is open, do_move freezes movement/buttons/impulses/view and skips combat features; ESP and the speed graph keep drawing. Dummy controls do not touch the real config yet. The text menu is removed after feature parity in the next pass. --- src/hl2h.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/hl2h.cpp') diff --git a/src/hl2h.cpp b/src/hl2h.cpp index c4f8aad..c0c27af 100644 --- a/src/hl2h.cpp +++ b/src/hl2h.cpp @@ -540,6 +540,25 @@ static void do_move(int seq, float frametime) { bool inwater = (flags & FL_INWATER) != 0; const float *vel = (const float *)(e + g_net.velocity); + if (gui_is_open()) { + QAngle f = gui_frozen_view(); + g_cam_view = Vector{f.x, f.y, f.z}; + cmd->viewangles[0] = f.x; + cmd->viewangles[1] = f.y; + cmd->viewangles[2] = f.z; + cmd->forwardmove = 0.0f; + cmd->sidemove = 0.0f; + cmd->upmove = 0.0f; + cmd->buttons = 0; + cmd->impulse = 0; + cmd->weaponselect = 0; + cmd->weaponsubtype = 0; + cmd->mousedx = 0; + cmd->mousedy = 0; + note_modified(cmd, flags, vel); + return; + } + bool bhop_on = feature_active(FEAT_BHOP); bool abh_on = feature_active(FEAT_ABH); -- cgit v1.2.3