Skip to content

GuestSneezeOSDev/source-2013-imgui

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. Download imgui.lib and move it to src/lib/public
  4. 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();
  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

About

Fixed Imgui implementation for Source 2013

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%