Skip to content

Commit

Permalink
Add an horizontal divider for spawnmenu
Browse files Browse the repository at this point in the history
ContentSidebar and spawnicons are separated using this, and both can be resized horizontally. (Useful for the tiny static sidebar)
  • Loading branch information
Tenrys committed Feb 28, 2014
1 parent 8e2dd3a commit c1ff7ce
Showing 1 changed file with 12 additions and 2 deletions.
@@ -1,4 +1,3 @@

include( "ContentIcon.lua" )
include( "PostProcessIcon.lua" )

Expand Down Expand Up @@ -38,6 +37,15 @@ function PANEL:Init()
self.ContentNavBar:SetSize( 190, 10 );
self.ContentNavBar:DockMargin( 0, 0, 4, 0 )
self.HorizontalDivider = vgui.Create( "DHorizontalDivider", self );
self.HorizontalDivider:Dock( FILL );
self.HorizontalDivider:SetLeftWidth( 175 )
self.HorizontalDivider:SetLeftMin( 175 )
self.HorizontalDivider:SetRightMin( 450 )
self.HorizontalDivider:SetLeft( self.ContentNavBar );
end
function PANEL:EnableModify()
Expand All @@ -62,7 +70,9 @@ function PANEL:SwitchPanel( panel )
self.SelectedPanel:Dock( FILL )
self.SelectedPanel:SetVisible( true )
self:InvalidateParent()
self.HorizontalDivider:SetRight( self.SelectedPanel );
end
Expand Down

0 comments on commit c1ff7ce

Please sign in to comment.