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.)
- Add this repo as a submodule to your Source mod
- Include the VPC file in your client_base.vpc
- Download
imgui.lib
and move it tosrc/lib/public
- open
source_dll_win32_base.vpc
and add
$Implib "$LIBPUBLIC\imgui"
right after $Implib "$LIBPUBLIC\vstdlib"
5. 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();
- That's it!
- 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.
For an example of a standalone app in Source with imgui, see this