Spawnmenu tweak
This commit is contained in:
parent
d894204ef6
commit
96a2732f3d
|
@ -162,11 +162,16 @@ if CLIENT then
|
||||||
local itemlist = smenu:Add("DScrollPanel")
|
local itemlist = smenu:Add("DScrollPanel")
|
||||||
itemlist:Dock( FILL )
|
itemlist:Dock( FILL )
|
||||||
|
|
||||||
|
local List = vgui.Create( "DIconLayout", itemlist )
|
||||||
|
List:Dock( FILL )
|
||||||
|
List:SetSpaceX( 5 )
|
||||||
|
List:SetSpaceY( 5 )
|
||||||
|
|
||||||
for ClassName, Class in SortedPairsByMemberValue( WEAPONS, "Name" ) do
|
for ClassName, Class in SortedPairsByMemberValue( WEAPONS, "Name" ) do
|
||||||
local button = vgui.Create( "DButton" )
|
local button = vgui.Create( "DButton" )
|
||||||
itemlist:AddItem( button )
|
List:Add( button )
|
||||||
button:SetSize( 1, ss(30) )
|
button:SetSize( ss(96), ss(22) )
|
||||||
button:Dock( TOP )
|
--button:Dock( TOP )
|
||||||
button:DockMargin( 0, 0, 0, ss(4) )
|
button:DockMargin( 0, 0, 0, ss(4) )
|
||||||
|
|
||||||
button.Text_Name = Class.Name
|
button.Text_Name = Class.Name
|
||||||
|
@ -190,9 +195,9 @@ if CLIENT then
|
||||||
surface.SetTextPos( ss(4), ss(4) )
|
surface.SetTextPos( ss(4), ss(4) )
|
||||||
surface.DrawText( self.Text_Name )
|
surface.DrawText( self.Text_Name )
|
||||||
|
|
||||||
surface.SetFont( "Benny_12" )
|
-- surface.SetFont( "Benny_10" )
|
||||||
surface.SetTextPos( ss(4), ss(4 + 12) )
|
-- surface.SetTextPos( ss(4), ss(4 + 12) )
|
||||||
surface.DrawText( self.Text_Desc )
|
-- surface.DrawText( self.Text_Desc )
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue