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
|
|
|
{
|
2024-01-02 15:21:36 +01:00
|
|
|
int result = CEngineVGui__Paint(thisptr, mode);
|
2022-02-19 02:31:16 +01:00
|
|
|
|
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
|
|
|
{
|
2024-01-21 21:29:23 +01:00
|
|
|
g_TextOverlay.Update();
|
2022-02-19 02:31:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2023-11-26 13:21:20 +01:00
|
|
|
void VEngineVGui::Detour(const bool bAttach) const
|
2022-02-19 02:31:16 +01:00
|
|
|
{
|
2024-01-02 15:21:36 +01:00
|
|
|
DetourSetup(&CEngineVGui__Paint, &CEngineVGui::Paint, bAttach);
|
2022-02-19 02:31:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|