mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Utilize the new IDetour::DetourSetup() code, IDetour::Attach and IDetour::Detach have been removed in favor of this (significantly reduces chance of user error). Since the template check happens in the idetour header, it is much more aggressive on type mismatches, such as a difference in parameter types, between the function and detour, will now raise a compile time error. As a result, some type mismatches have been fixed in this commit as well.
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
//===========================================================================//
|
|
//
|
|
// Purpose: Implements all the functions exported by the GameUI dll.
|
|
//
|
|
// $NoKeywords: $
|
|
//===========================================================================//
|
|
|
|
#include <core/stdafx.h>
|
|
#include <tier1/cvar.h>
|
|
#include <engine/sys_utils.h>
|
|
#include <vgui/vgui_debugpanel.h>
|
|
#include <vgui/vgui_baseui_interface.h>
|
|
#include <vguimatsurface/MatSystemSurface.h>
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
int CEngineVGui::Paint(CEngineVGui* thisptr, PaintMode_t mode)
|
|
{
|
|
int result = CEngineVGui_Paint(thisptr, mode);
|
|
|
|
if (/*mode == PaintMode_t::PAINT_UIPANELS ||*/ mode == PaintMode_t::PAINT_INGAMEPANELS) // Render in-main menu and in-game.
|
|
{
|
|
g_pOverlay->Update();
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
void VEngineVGui::Detour(const bool bAttach) const
|
|
{
|
|
DetourSetup(&CEngineVGui_Paint, &CEngineVGui::Paint, bAttach);
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|