Creating VGUI from C++ - NOT getting a reference to vgui.Create(...) in Lua

I was wondering if anyone has an idea on how to create VGUI Panels only using C++ and not Lua.

Any help is appreciated!

My guess is you’re going to have to use GLua calls because if I’m not mistaken most of derma is coded in lua.

I want to create regular VGUI panels, not derma.

**EDIT: **The whole problem is that vgui.Create could be overwritten by other Lua and I don’t want that.

**EDIT 2: **If I could somehow sigscan the Frame constructor and memory allocation could I use that? Not sure if anyone knows about something that.

Import the vgui interface or store vgui.Create as a local variable.

I believe it is much easier than that. Using the Source SDK files, you could just do it like this:

vgui::Frame frame;

And from then on you just call its methods. Of course, you must be cautious with out of scope situations (I’d just do a global if possible).
Now, if Garry changed something in the headers (which seems very likely, I’ve never been able to work with vgui directly)… you’re fucked.