Margen67 (11-01-2014),z346etn56jzd7egth (10-21-2014)
if you cannot figure out how to use this yourself leave the thread
i posted some vmt hook class a while ago just look for itCode: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
Margen67 (11-01-2014),z346etn56jzd7egth (10-21-2014)
or use your own drawing functions?
Color (10-22-2014)
This would work, but be sure to actually define the OverlayPopupPanel. It's good coding practice.
Trollaux (10-22-2014)
Good job, though this should work without 'try'.
Edit:
Good job on getting minion.
Last edited by gayguy911; 10-22-2014 at 03:29 PM.
also, instead of using the useless DWORD dwEDX you can just make that argument a void pointer with no name.
fag dont delete my post, you're supposed to grab the interface for IEngineVGui, so you can draw before the original PaintTraverse is called
i think you can figure out what func to use
uh huh
namespace vgui
{
// handle to an internal vgui panel
// this is the only handle to a panel that is valid across dll boundaries
typedef unsigned int VPANEL;
// handles to vgui objects
// NULL values signify an invalid value
typedef unsigned long HScheme;
typedef unsigned long HTexture;
typedef unsigned long HCursor;
typedef unsigned long HPanel;
const HPanel INVALID_PANEL = 0xffffffff;
typedef unsigned long HFont;
const HFont INVALID_FONT = 0; // the value of an invalid font handle
}
LordOfGears2 (11-20-2014)
use __stdcall to be a pro fuck that other useless shit
You can use unsigned int instead of VPANEL, it doesn't make any difference.
You also don't have to actually check if you're in-game to use painttraverse because afaik it's called in the menu anyway. You can draw your menu in the game's menu by using OPP.