• VGUI Tabs
    7 replies, posted
How can I create tabs similar to these on my menu? [T]http://i.imgur.com/lp8Z0CC.png[/T]
[QUOTE=DeadShotKillz;46657966]How can I create tabs similar to these on my menu? [T]http://i.imgur.com/lp8Z0CC.png[/T][/QUOTE] [URL="wiki.garrysmod.com/page/Category:DPropertySheet"]wiki.garrysmod.com/page/Category:DPropertySheet[/URL]
How do you set them up? Currently there isn't any pages or media in the category.
[url]http://pastebin.com/7J0uChZ4[/url] Heres an example from the old wiki.
Im trying to make tabs with individuals buttons but I just get one huge button. [CODE] net.Receive("Menu", function(l,c, ply) local DermaPanel = vgui.Create( "DFrame" ) -- Creates the frame itself DermaPanel:SetPos( 250,ScrH()/2 - 250 ) -- Position on the players screen DermaPanel:SetSize( 600, 500 ) -- Size of the frame DermaPanel:SetTitle( "Testing Derma Stuff" ) -- Title of the frame DermaPanel:SetVisible( true ) DermaPanel:SetDraggable( true ) -- Draggable by mouse? DermaPanel:ShowCloseButton( true ) -- Show the close button? DermaPanel:MakePopup() -- Show the frame local button = vgui.Create( "DButton" ) button:SetParent( DermaPanel ) button:SetText("Guns") button:SetPos( 250, ScrH()/2 - 250) button:SetSize( 100, 100) button.DoClick = function (ply) net.Start("Guns") net.SendToServer() end local ammo = vgui.Create( "DButton" ) ammo:SetParent( DermaPanel ) ammo:SetText("Ammo") ammo:SetPos( 250, ScrH()/2 - 300) ammo:SetSize( 100, 100) ammo.DoClick = function (ply) net.Start("Ammo") net.SendToServer() end local PropertySheet = vgui.Create( "DPropertySheet" ) PropertySheet:SetParent( DermaPanel ) PropertySheet:SetPos( 0, 30 ) PropertySheet:SetSize( 600, 500 ) PropertySheet:AddSheet( "Teams", button, "icon16/user.png", false, false, "WOW It's a text box!!!" ) PropertySheet:AddSheet( "Staff Menu", ammo, "icon16/group.png", false, false, "Can I haz meh cheezburger now?" ) end) [/CODE] This is what it looks like. [T]http://i.imgur.com/XgfoKvI.png[/T] So how could I make a tab that has individual buttons?
Create a DPanel for each tab and use that when you AddSheet instead of ammo/button, then create your buttons and parent them to their respective panels
snip pui
Sorry, you need to Log In to post a reply to this thread.