PaintTraverse hook
if you cannot figure out how to use this yourself leave the thread
Code:
void __fastcall hkPaintTraverse(void *pThis, DWORD dwEDX, VPANEL vguiPanel, bool forceRepaint, bool allowForce) {
pPaintTraverse(pThis, vguiPanel, forceRepaint, allowForce); // for this make ur own hook of PaintTraverseFn it isnt hard just use vmttable hooking, the offset is 41
/*
pointers._panel is defined as IPanel *_panel;
this->m_pPanel is defined as IPanel *m_pPanel;
heres the interfacing code for it
this->m_pPanel = (IPanel *) VMTHookManager.GetPointer( "vgui2.dll", "VGUI_Panel" ); // pretty sure VGUI_Panel is fine and it doesnt matter, if u are paranoid just look for the actual name defined in the sdk
pointers._panel = this->m_pPanel;
*/
static VPANEL OverlayPopupPanel; // VPANEL is just a more fancy version of unsigned int for use in vgui
if (OverlayPopupPanel == NULL) { // check if its null (doesnt have a value)
const char* panelName = pointers._panel->GetClassName(vguiPanel); // get class name of the panel
if (panelName[0] == 'O' && panelName[7] == 'P') { // found this bit on pastebin, it works
OverlayPopupPanel = vguiPanel; // set the value of OverlayPopupPanel
}
}
if (vguiPanel == OverlayPopupPanel) { // check if our vguipanel is overlaypopuppanel
try { // incase gmod has a sperg attack
if (pointers._engine->IsInGame()) { // check if u are in the game (fully connected to a server and not loading and active in the game)
// draw stuff
}
} catch(...) { // incase gmod has a sperg attack
}
}
}
use the isurface library to draw with this where i commented

