2022-02-19 02:31:16 +01:00
|
|
|
//===========================================================================//
|
|
|
|
//
|
|
|
|
// Purpose: Implements all the functions exported by the GameUI dll.
|
|
|
|
//
|
|
|
|
// $NoKeywords: $
|
|
|
|
//===========================================================================//
|
|
|
|
|
|
|
|
#include <core/stdafx.h>
|
2022-04-09 16:16:40 +02:00
|
|
|
#include <tier1/cvar.h>
|
2022-02-28 01:01:40 +01:00
|
|
|
#include <engine/sys_utils.h>
|
2022-02-19 02:31:16 +01:00
|
|
|
#include <vgui/vgui_debugpanel.h>
|
|
|
|
#include <vgui/vgui_baseui_interface.h>
|
2022-06-12 17:50:12 +02:00
|
|
|
#include <vguimatsurface/MatSystemSurface.h>
|
2022-02-19 02:31:16 +01:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//-----------------------------------------------------------------------------
|
2022-06-12 17:50:12 +02:00
|
|
|
int CEngineVGui::Paint(CEngineVGui* thisptr, PaintMode_t mode)
|
2022-02-19 02:31:16 +01:00
|
|
|
{
|
|
|
|
int result = CEngineVGui_Paint(thisptr, mode);
|
|
|
|
|
2022-06-12 17:50:12 +02:00
|
|
|
if (/*mode == PaintMode_t::PAINT_UIPANELS ||*/ mode == PaintMode_t::PAINT_INGAMEPANELS) // Render in-main menu and in-game.
|
2022-02-19 02:31:16 +01:00
|
|
|
{
|
2022-10-26 01:55:36 +02:00
|
|
|
g_pOverlay->Update();
|
2022-02-19 02:31:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2023-01-25 02:26:52 +01:00
|
|
|
void VEngineVGui::Attach() const
|
2022-02-19 02:31:16 +01:00
|
|
|
{
|
2022-06-12 17:50:12 +02:00
|
|
|
DetourAttach((LPVOID*)&CEngineVGui_Paint, &CEngineVGui::Paint);
|
2022-02-19 02:31:16 +01:00
|
|
|
}
|
|
|
|
|
2023-01-25 02:26:52 +01:00
|
|
|
void VEngineVGui::Detach() const
|
2022-02-19 02:31:16 +01:00
|
|
|
{
|
2022-06-12 17:50:12 +02:00
|
|
|
DetourDetach((LPVOID*)&CEngineVGui_Paint, &CEngineVGui::Paint);
|
2022-02-19 02:31:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|