//===========================================================================// // // Purpose: Implements all the functions exported by the GameUI dll. // // $NoKeywords: $ //===========================================================================// #include #include #include //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- int HCEngineVGui_Paint(void* thisptr, PaintMode_t mode) { int result = CEngineVGui_Paint(thisptr, mode); static void* pCMatSystemSurface = ADDRESS(0x14D40B3B0).RCast(); static auto fnRenderStart = ADDRESS(0x14053EFC0).RCast(); static auto fnRenderEnd = ADDRESS(0x14053F1B0).RCast(); if (mode == PaintMode_t::PAINT_UIPANELS || mode == PaintMode_t::PAINT_INGAMEPANELS) // Render in-main menu and in-game. { fnRenderStart(pCMatSystemSurface); g_pLogSystem.Update(); fnRenderEnd(); } return result; } /////////////////////////////////////////////////////////////////////////////// void CEngineVGui_Attach() { //DetourAttach((LPVOID*)&CEngineVGui_Paint, &HCEngineVGui_Paint); } void CEngineVGui_Detach() { //DetourDetach((LPVOID*)&CEngineVGui_Paint, &HCEngineVGui_Paint); } ///////////////////////////////////////////////////////////////////////////////