Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include( "character_creation_designer.lua" )
- local cc_menu_title = "P l a y"
- local cc_menu_subtitle = "What do you want to do?"
- surface.SetFont( "cc_menu_title" )
- local cc_menu_title_l = surface.GetTextSize( cc_menu_title ) / 2
- surface.SetFont( "cc_menu_subtitle" )
- local cc_menu_subtitle_l = surface.GetTextSize( cc_menu_subtitle ) / 2
- local cc_menu_button1_text = "Load Character"
- local cc_menu_button2_text = "New Character"
- local cc_menu_button3_text = "Back"
- local t = true
- local f = false
- local scrw_half = ScrW() / 2
- local scrh_half = ScrH() / 2
- local rgba = Color
- local cc_background = rgba( 236, 240, 241, 255 )
- local cc_text_color = rgba( 255, 255, 255, 255 )
- local cc_button_color = rgba( 231, 76, 60, 255 )
- local cc_highlight_color = rgba( 211, 56, 30, 255 )
- surface.CreateFont( "cc_menu_title", {
- font = "Ostrich Sans",
- size = 100,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = t,
- underline = f,
- italic = f,
- strikeout = f,
- symbol = f,
- rotary = f,
- shadow = f,
- additive = f,
- outline = f,
- } )
- surface.CreateFont( "cc_menu_subtitle", {
- font = "Ostrich Sans",
- size = 40,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = t,
- underline = f,
- italic = f,
- strikeout = f,
- symbol = f,
- rotary = f,
- shadow = f,
- additive = f,
- outline = f,
- } )
- surface.CreateFont( "cc_menu_buttons", {
- font = "Ostrich Sans",
- size = 25,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = t,
- underline = f,
- italic = f,
- strikeout = f,
- symbol = f,
- rotary = f,
- shadow = f,
- additive = f,
- outline = f,
- } )
- function Character_Creation()
- local cc_menu_frame = vgui.Create( "DFrame" )
- cc_menu_frame:SetPos( 0, 0 )
- cc_menu_frame:SetSize( ScrW(), ScrH() )
- cc_menu_frame:SetTitle( " " )
- cc_menu_frame:SetVisible( t )
- cc_menu_frame:SetDraggable( f )
- cc_menu_frame:ShowCloseButton( f )
- cc_menu_frame:MakePopup()
- cc_menu_frame.Paint = function( panel, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, cc_background )
- surface.SetFont( "cc_menu_title" )
- surface.SetTextColor( 0, 0, 0, 255 )
- surface.SetTextPos( scrw_half - cc_menu_title_l, scrh_half - 103 )
- surface.DrawText( cc_menu_title )
- surface.SetTextColor( 0, 0, 0, 255 )
- surface.SetFont( "cc_menu_subtitle" )
- surface.SetTextPos( scrw_half - cc_menu_subtitle_l, scrh_half )
- surface.SetFont( "cc_menu_subtitle" )
- surface.DrawText( cc_menu_subtitle )
- end
- local cc_menu_button_row = vgui.Create( "DPanel", cc_menu_frame )
- cc_menu_button_row:SetPos( scrw_half - 600 / 2, scrh_half + 45 )
- cc_menu_button_row:SetSize( 600, 60 )
- cc_menu_button_row.Paint = function( panel, w, h )
- draw.RoundedBox( 0, 0, 0, w, h + 3, rgba( 206, 210, 211, 255 ) )
- end
- local cc_menu_highlight = vgui.Create( "DPanel", cc_menu_button_row )
- cc_menu_highlight:SetPos( -120, 0 )
- cc_menu_highlight:SetSize( 200, 80 )
- cc_menu_highlight.Paint = function( panel, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, cc_highlight_color )
- end
- local cc_menu_button1 = vgui.Create( "DButton", cc_menu_button_row )
- cc_menu_button1:SetSize( 200, 60 )
- cc_menu_button1:SetPos( 0, 0 )
- cc_menu_button1:SetText( cc_menu_button1_text )
- cc_menu_button1:SetFont( "cc_menu_buttons" )
- cc_menu_button1:SetColor( cc_text_color )
- function cc_menu_button1:OnCursorEntered( )
- cc_menu_highlight:MoveTo( 0, 0, 0.3, 0, -5 )
- end
- cc_menu_button1.DoClick = function()
- cc_menu_frame:Remove()
- end
- cc_menu_button1.Paint = function( panel, w, h )
- draw.RoundedBox( 0, 0, 0, w, h - 3, cc_button_color )
- end
- local cc_menu_button2 = vgui.Create( "DButton", cc_menu_button_row )
- cc_menu_button2:SetSize( 200, 60 )
- cc_menu_button2:SetPos( 200, 0 )
- cc_menu_button2:SetText( cc_menu_button2_text )
- cc_menu_button2:SetFont( "cc_menu_buttons" )
- cc_menu_button2:SetColor( cc_text_color )
- function cc_menu_button2:OnCursorEntered( )
- cc_menu_highlight:MoveTo( 200, 0, 0.3, 0, -5 )
- end
- cc_menu_button2.DoClick = function()
- cc_menu_frame:Remove()
- Character_Creation_Designer()
- end
- cc_menu_button2.Paint = function( panel, w, h )
- draw.RoundedBox( 0, 0, 0, w, h - 3, cc_button_color )
- end
- local cc_menu_button3 = vgui.Create( "DButton", cc_menu_button_row )
- cc_menu_button3:SetSize( 200, 60 )
- cc_menu_button3:SetPos( 200 * 2, 0 )
- cc_menu_button3:SetText( cc_menu_button3_text )
- cc_menu_button3:SetFont( "cc_menu_buttons" )
- cc_menu_button3:SetColor( cc_text_color )
- function cc_menu_button3:OnCursorEntered( )
- cc_menu_highlight:MoveTo( 200 * 2, 0, 0.3, 0, -5 )
- end
- cc_menu_button3.DoClick = function()
- cc_menu_frame:Remove()
- Main_Menu_Create()
- end
- cc_menu_button3.Paint = function( panel, w, h )
- draw.RoundedBox( 0, 0, 0, w, h - 3, cc_button_color )
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement