Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function mainMenuTheme()
- surface.PlaySound( "main_menu_background.mp3" )
- timer.Simple( 190, function()
- mainMenuTheme()
- end )
- end
- local mainMenuLinks = {
- [ "NEW CHRACTER" ] = { funcclick = function() print("clicked1") end },
- [ "CHRACTER SELECTION" ] = { funcclick = function() print("clicked2") end },
- [ "SETTINGS" ] = { funcclick = function() print("clicked3") end },
- [ "DISCONNECT" ] = { funcclick = function() print("clicked4") end }
- }
- concommand.Add( "menu", function()
- local mainPanel = vgui.Create( "DPanel" )
- mainPanel:SetSize( ScrW(), ScrH() )
- mainPanel.Paint = function()
- draw.RoundedBox( 0, 0, 0, mainPanel:GetWide(), mainPanel:GetTall(), Color( 0, 0, 0, 0 ) )
- end
- local title = vgui.Create( "DLabel", mainPanel )
- title:SetFont( "mainmenu_title" )
- title:SetText( "CITY LIFE" )
- title:SetPos( 50, 50 )
- title:SizeToContents()
- local subtitle = vgui.Create( "DLabel", mainPanel )
- subtitle:SetFont( "subtitle" )
- subtitle:SetText( "MAIN MENU" )
- subtitle:SetPos( 50, 50 + title:GetTall() )
- subtitle:SizeToContents()
- mainMenu()
- end )
- function mainMenu()
- local menuLinksPanel = vgui.Create( "DPanel", mainPanel )
- menuLinksPanel:SetSize( 400, 600 )
- menuLinksPanel:SetPos( 50, 150 )
- menuLinksPanel.Paint = function()
- draw.RoundedBox( 0, 0, 0, mainPanel:GetWide(), mainPanel:GetTall(), Color( 0, 0, 0, 0 ) )
- end
- local i = 0
- for k, v in pairs( mainMenuLinks ) do
- local menuLinks = vgui.Create( "DButton", menuLinksPanel )
- menuLinks:SetPos( 0, i )
- menuLinks:SetFont( "subtitle" )
- menuLinks:SetText( k )
- menuLinks.DoClick = v.funcclick
- menuLinks:SizeToContents()
- i = i + 25
- end
- end
- function chracterCreation()
- end
- function characterSelection()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement