Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('shared.lua')
- function ENT:Draw()
- self:DrawModel()
- end
- net.Receive("launchmenu", function ()
- local fenetre = vgui.Create( "DFrame" )
- fenetre:SetPos( 100, 100 )
- fenetre:SetSize( 550, 600 )
- fenetre:SetTitle( "Caisse de fortifications" )
- fenetre:Center()
- fenetre:SetDraggable( true )
- fenetre:MakePopup()
- fenetre:ShowCloseButton( false )
- fenetre.Paint = function(self, w, h)
- draw.RoundedBox(5,0,0,w,h,Color(50,50,50,255))
- draw.RoundedBox(0, 0, 25, w, 1,Color(255,255,255,255))
- end
- local scroll = vgui.Create( "DScrollPanel", fenetre ) -- Create the Scroll panel
- scroll:Dock( FILL )
- local list = vgui.Create( "DIconLayout", scroll )
- list:Dock( FILL )
- list:SetSpaceY( 50 )
- list:SetSpaceX( 100 )
- for i = 1, 10 do -- Make a loop to create a bunch of panels inside of the DIconLayout
- local listitem = list:Add( "DPanel" ) -- Add DPanel to the DIconLayout
- listitem:SetSize( 250, 200 ) -- Set the size of it
- end
- --local listlabel = list:Add( "DLabel" ) -- Add a label that will be the only panel on its row
- --listlabel.OwnLine = true -- The magic variable that specifies this item has its own line all for itself
- --listlabel:SetText( "Hello World!" )
- local closebouton = vgui.Create( "DButton", fenetre ) -- Create the button and parent it to the frame
- closebouton:SetText( "X" ) -- Set the text on the button
- closebouton:SetPos( 530, 0 ) -- Set the position on the frame
- closebouton:SetSize( 20, 20 ) -- Set the size
- closebouton.Paint = function(self, w, h)
- draw.RoundedBox(5,0,0,w,h,Color(255,255,255,255))
- end
- closebouton.DoClick = function()
- fenetre:Close()
- end
- local icon01 = vgui.Create( "DModelPanel", fenetre )
- icon01:SetSize( 225,225 )
- icon01:SetPos( 10,-20 )
- icon01:SetModel( "models/props_fortifications/sandbags_corner1.mdl" ) -- you can only change colors on playermodels
- function icon01:LayoutEntity( Entity ) return end -- disables default rotation
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement