Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 904 Bytes

README.md

File metadata and controls

35 lines (23 loc) · 904 Bytes

Source 2013 imgui

This repo contains an imgui implementation for Source 2013 based on the one we developed for Strata Source (Portal 2: Community Edition, Momentum Mod, etc.)

Integrating

  1. Add this repo as a submodule to your Source mod
  2. Include the VPC file in your client_base.vpc
  3. Add the following code to cdll_client_int.cpp

At the top of the file:

#include "imgui/imgui_system.h"

Towards the end of CHLClient::Init:

g_pImguiSystem->Init();

At the start of CHLClient::Shutdown:

g_pImguiSystem->Shutdown();
  1. That's it!

Limitations

  • Interop with vgui isn't the greatest, as we need to intercept input from vgui itself and redirect it to imgui. An invisible popup panel is used for this purpose.

See Also

For an example of a standalone app in Source with imgui, see this