• (semi)custom gui toolmenu wont show options
    3 replies, posted
I'm working on my custom gamemode's prop/tool GUI and I decided making a tool gui was too hard, especially when there was one available. So I used [code] local toolmenu = vgui.Create("ToolMenu", Frame) toolmenu:LoadTools() toolmenu:Dock(RIGHT) [/code] to put the default toolmenu on the side of my GUI. Everything works except when I click a tool, it shows up on the toolgun, and the options show in the context menu, but the options wont show in the box on the gui. They just dont show up. Do i need another element or something?
DPanel:dock can only be used on panels, which you could define in a DFrame like this: [code] local myFrame = vgui.Create("DFrame") myFrame:SetPos( x, y ) myFrame:SetTitle( "Your Title Here") myFrame:SetSize( xsize, ysize ) myFrame:MakePopup() local myPanel = vgui.Create("DPanel", myFrame) myPanel:Dock( RIGHT ) [/code]
Why the fuck do you tell him to change the variable Frame to DFrame? Its a variable! It depends on what variable he has asigned the main panel to. Also, instead of using dock on the toolmenu try using setsize and setpos instead
[QUOTE=geferon;49251195]Why the fuck do you tell him to change the variable Frame to DFrame? Its a variable! It depends on what variable he has asigned the main panel to. Also, instead of using dock on the toolmenu try using setsize and setpos instead[/QUOTE] That's just what i'm used to using I suppose, removed
Sorry, you need to Log In to post a reply to this thread.