• DModelPanel in DCollapsibleCategory
    3 replies, posted
So I'm trying to put a DModelPanel inside a DCollapsibleCategory but am failing horribly. [URL="http://puu.sh/b28Pb.gif"][IMG]http://puu.sh/b28Pb.gif[/IMG][/URL] [I]Click if not animated...[/I] [CODE] if CLIENT then local PANEL = {} function PANEL:Init() self:SetPos(ScrW() * 0.375, ScrH() * 0.125) self:SetSize(ScrW() * nut.config.menuWidth, ScrH() * nut.config.menuHeight) self:MakePopup() self:SetTitle("VGUI Test") local preview = self:Add("DCollapsibleCategory") preview:Dock(TOP) preview:SetExpanded(0) preview:SetLabel("DModelPanel") local model = preview:Add("DModelPanel") model:SetPos(10, 20) model:SetSize(250, 200) model:SetModel("models/player/alyx.mdl") end vgui.Register("nut_VGTest", PANEL, "DFrame") end [/CODE] [B]HALP MEH! [I]I'm dumb[/I][/B]
don't use Add, just create it the normal way using vgui.Create
DCollapsibleCategory is pretty terrible and hard to get to work imo.
[QUOTE=skullorz;45760347]don't use Add, just create it the normal way using vgui.Create[/QUOTE] Worked Thanks!
Sorry, you need to Log In to post a reply to this thread.