• Derma Menu Problems
    8 replies, posted
Hey i finally got a working code but theirs a few problems ill get to them after screen shots [img]http://img100.imageshack.us/img100/40/66186974.png[/img] [img]http://img62.imageshack.us/img62/3297/221gv.png[/img] Here is the code [code] function test() local PropertySheet = vgui.Create( "DPropertySheet" ) PropertySheet:SetParent( DermaPanel ) PropertySheet:SetPos( 5, 30 ) PropertySheet:SetSize( 340, 315 ) local SheetItemOne = vgui.Create( "DCheckBoxLabel" ) SheetItemOne:SetText( "Use Props?" ) SheetItemOne:SetConVar( "some_convar" ) SheetItemOne:SetValue( 1 ) SheetItemOne:SizeToContents() local SheetItemTwo = vgui.Create( "DCheckBoxLabel" ) SheetItemTwo:SetText( "Use SENTs?" ) SheetItemTwo:SetConVar( "some_convar" ) SheetItemTwo:SetValue( 1 ) SheetItemTwo:SizeToContents() local SheetItemTwo = vgui.Create( "DCheckBoxLabel" ) SheetItemTwo:SetText( "poop" ) SheetItemTwo:SetConVar( "some_convar" ) SheetItemTwo:SetValue( 1 ) SheetItemTwo:SizeToContents() PropertySheet:AddSheet( "Some Menu", SheetItemOne, "gui/silkicons/user", false, false, "WOW It's a text box!!!" ) PropertySheet:AddSheet( "Super Menu", SheetItemTwo, "gui/silkicons/group", false, false, "Can I haz meh cheezburger now?" ) end concommand.Add("testing", test) [/code] The problem is when i add "poop" check box it kicks snets out of the tab also it does not free my mouse to click it i can only click it in the esc menu also exit button code plz? HELP PLZ! thanks
In your calls to vgui.Create, put the parent panel as the second parameter. Then say that three times fast.
[QUOTE=yakahughes;21701664]In your calls to vgui.Create, put the parent panel as the second parameter. Then say that three times fast.[/QUOTE] O.o what? [editline]10:32PM[/editline] [QUOTE=yakahughes;21701664]In your calls to vgui.Create, put the parent panel as the second parameter. Then say that three times fast.[/QUOTE] example please
You also have 2 things as SheetItemTwo
TT can someone just tell me how to fix it
[QUOTE=jgwetworth;21704367]TT can someone just tell me how to fix it[/QUOTE] [lua]function test() local PropertySheet = vgui.Create( "DPropertySheet" ) PropertySheet:SetParent( DermaPanel ) PropertySheet:SetPos( 5, 30 ) PropertySheet:SetSize( 340, 315 ) local SheetItemOne = vgui.Create( "DCheckBoxLabel" ) SheetItemOne:SetText( "Use Props?" ) SheetItemOne:SetConVar( "some_convar" ) SheetItemOne:SetValue( 1 ) SheetItemOne:SizeToContents() local SheetItemTwo = vgui.Create( "DCheckBoxLabel" ) SheetItemTwo:SetText( "Use SENTs?" ) SheetItemTwo:SetConVar( "some_convar" ) SheetItemTwo:SetValue( 1 ) SheetItemTwo:SizeToContents() local SheetItemTree = vgui.Create( "DCheckBoxLabel" ) SheetItemTree:SetText( "poop" ) SheetItemTree:SetConVar( "some_convar" ) SheetItemTree:SetValue( 1 ) SheetItemTree:SizeToContents() PropertySheet:AddSheet( "Some Menu", SheetItemOne, "gui/silkicons/user", false, false, "WOW It's a text box!!!" ) PropertySheet:AddSheet( "Super Menu", SheetItemTwo, "gui/silkicons/group", false, false, "Can I haz meh cheezburger now?" ) PropertySheet:AddSheet( "Tree Menu", SheetItemTree, "gui/silkicons/group", false, false, "Can I haz meh cheezburger now?" ) end concommand.Add("testing", test)[/lua] Ps: add a derma frame will look nicer.
[img]http://img204.imageshack.us/img204/74/42014204.jpg[/img] Already did still haveing a few problems tho.
I don't see any problems, besides spacing issues.
Your problem is you never do anything with the "Use SENTS?" label. It's just kinda hanging out there on the screen.
Sorry, you need to Log In to post a reply to this thread.