Skip to content

Basic ImGui implementation#367

Open
Wolfboy248 wants to merge 11 commits into
p2sr:masterfrom
Wolfboy248:master
Open

Basic ImGui implementation#367
Wolfboy248 wants to merge 11 commits into
p2sr:masterfrom
Wolfboy248:master

Conversation

@Wolfboy248

@Wolfboy248 Wolfboy248 commented Jun 14, 2026

Copy link
Copy Markdown

This is a very rough implementation of some ImGui in sar using VGui. There are some glaring issues with rendering and with structure, but it looks alright for now.

New Commands

These commands are definitely not final, but it's a start.

  • sar_imgui_toggle - toggle ImGui
  • sar_imgui_toggle_window <window> - toggles the visibility of the given ImGui window
  • sar_imgui_list_windows - lists all registered ImGui windows
  • sar_imgui_toggle_hud <hud> - toggles the visibility of the given ImGui hud
  • sar_imgui_list_huds - lists all registered HUDs
  • sar_imgui_toggle_edit_mode - Toggles HUD editing

New stuff

  • ImGui VGui backend
  • Menu bar to easily access SAR through a user interface (theoretically)
  • Demoplayer in ImGui
  • Basic modular HUD system (showpos, ihud etc.). PROTOTYPE!
    • Allows for easy customization of HUD elements, theoretically.
  • New hooks
    • UnlockCursor (Surface) hook. Used for locking the cursor when ImGui is active.
    • IN_KeyEvent (Engine) hook. Used to block input to the game when ImGui is active.
  • Embedded fonts and icons
    • Also potential for easy custom font support

Note: the camera control system was changed slightly. Burger mentioned something about it being changed for the deep dip event, but I changed it so cam control would work in demos or something. If I'm being honest it would be good to look at camera control again at one point and polish it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant