summaryrefslogtreecommitdiffstats
path: root/src/hl2h.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 18:02:10 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 18:02:10 +0100
commit0e9f3422e37d0b2d1344efec5ceb07c2246bfcd7 (patch)
treea8aa0b5a4718f0e7d407a31135823523a77744b0 /src/hl2h.cpp
parentSpeedgraph: lower the graph (diff)
downloadhl2h-0e9f3422e37d0b2d1344efec5ceb07c2246bfcd7.tar.gz
hl2h-0e9f3422e37d0b2d1344efec5ceb07c2246bfcd7.zip
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.
Diffstat (limited to '')
-rw-r--r--src/hl2h.cpp19
1 files changed, 19 insertions, 0 deletions
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) {
540 bool inwater = (flags & FL_INWATER) != 0; 540 bool inwater = (flags & FL_INWATER) != 0;
541 const float *vel = (const float *)(e + g_net.velocity); 541 const float *vel = (const float *)(e + g_net.velocity);
542 542
543 if (gui_is_open()) {
544 QAngle f = gui_frozen_view();
545 g_cam_view = Vector{f.x, f.y, f.z};
546 cmd->viewangles[0] = f.x;
547 cmd->viewangles[1] = f.y;
548 cmd->viewangles[2] = f.z;
549 cmd->forwardmove = 0.0f;
550 cmd->sidemove = 0.0f;
551 cmd->upmove = 0.0f;
552 cmd->buttons = 0;
553 cmd->impulse = 0;
554 cmd->weaponselect = 0;
555 cmd->weaponsubtype = 0;
556 cmd->mousedx = 0;
557 cmd->mousedy = 0;
558 note_modified(cmd, flags, vel);
559 return;
560 }
561
543 bool bhop_on = feature_active(FEAT_BHOP); 562 bool bhop_on = feature_active(FEAT_BHOP);
544 bool abh_on = feature_active(FEAT_ABH); 563 bool abh_on = feature_active(FEAT_ABH);
545 564