Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. include( "character_creation_designer.lua" )
  2.  
  3. local cc_menu_title = "P l a y"
  4. local cc_menu_subtitle = "What do you want to do?"
  5. surface.SetFont( "cc_menu_title" )
  6. local cc_menu_title_l = surface.GetTextSize( cc_menu_title ) / 2
  7. surface.SetFont( "cc_menu_subtitle" )
  8. local cc_menu_subtitle_l = surface.GetTextSize( cc_menu_subtitle ) / 2
  9.  
  10. local cc_menu_button1_text = "Load Character"
  11. local cc_menu_button2_text = "New Character"
  12. local cc_menu_button3_text = "Back"
  13.  
  14. local t = true
  15. local f = false
  16.  
  17. local scrw_half = ScrW() / 2
  18. local scrh_half = ScrH() / 2
  19.  
  20. local rgba = Color
  21.  
  22. local cc_background = rgba( 236, 240, 241, 255 )
  23. local cc_text_color = rgba( 255, 255, 255, 255 )
  24. local cc_button_color = rgba( 231, 76, 60, 255 )
  25. local cc_highlight_color = rgba( 211, 56, 30, 255 )
  26.  
  27. surface.CreateFont( "cc_menu_title", {
  28. font = "Ostrich Sans",
  29. size = 100,
  30. weight = 500,
  31. blursize = 0,
  32. scanlines = 0,
  33. antialias = t,
  34. underline = f,
  35. italic = f,
  36. strikeout = f,
  37. symbol = f,
  38. rotary = f,
  39. shadow = f,
  40. additive = f,
  41. outline = f,
  42. } )
  43.  
  44. surface.CreateFont( "cc_menu_subtitle", {
  45. font = "Ostrich Sans",
  46. size = 40,
  47. weight = 500,
  48. blursize = 0,
  49. scanlines = 0,
  50. antialias = t,
  51. underline = f,
  52. italic = f,
  53. strikeout = f,
  54. symbol = f,
  55. rotary = f,
  56. shadow = f,
  57. additive = f,
  58. outline = f,
  59. } )
  60.  
  61. surface.CreateFont( "cc_menu_buttons", {
  62. font = "Ostrich Sans",
  63. size = 25,
  64. weight = 500,
  65. blursize = 0,
  66. scanlines = 0,
  67. antialias = t,
  68. underline = f,
  69. italic = f,
  70. strikeout = f,
  71. symbol = f,
  72. rotary = f,
  73. shadow = f,
  74. additive = f,
  75. outline = f,
  76. } )
  77.  
  78. function Character_Creation()
  79.  
  80. local cc_menu_frame = vgui.Create( "DFrame" )
  81. cc_menu_frame:SetPos( 0, 0 )
  82. cc_menu_frame:SetSize( ScrW(), ScrH() )
  83. cc_menu_frame:SetTitle( " " )
  84. cc_menu_frame:SetVisible( t )
  85. cc_menu_frame:SetDraggable( f )
  86. cc_menu_frame:ShowCloseButton( f )
  87. cc_menu_frame:MakePopup()
  88.  
  89. cc_menu_frame.Paint = function( panel, w, h )
  90.  
  91. draw.RoundedBox( 0, 0, 0, w, h, cc_background )
  92.  
  93. surface.SetFont( "cc_menu_title" )
  94. surface.SetTextColor( 0, 0, 0, 255 )
  95. surface.SetTextPos( scrw_half - cc_menu_title_l, scrh_half - 103 )
  96. surface.DrawText( cc_menu_title )
  97.  
  98. surface.SetTextColor( 0, 0, 0, 255 )
  99. surface.SetFont( "cc_menu_subtitle" )
  100. surface.SetTextPos( scrw_half - cc_menu_subtitle_l, scrh_half )
  101. surface.SetFont( "cc_menu_subtitle" )
  102. surface.DrawText( cc_menu_subtitle )
  103.  
  104. end
  105.  
  106. local cc_menu_button_row = vgui.Create( "DPanel", cc_menu_frame )
  107. cc_menu_button_row:SetPos( scrw_half - 600 / 2, scrh_half + 45 )
  108. cc_menu_button_row:SetSize( 600, 60 )
  109.  
  110. cc_menu_button_row.Paint = function( panel, w, h )
  111.  
  112. draw.RoundedBox( 0, 0, 0, w, h + 3, rgba( 206, 210, 211, 255 ) )
  113.  
  114. end
  115.  
  116. local cc_menu_highlight = vgui.Create( "DPanel", cc_menu_button_row )
  117. cc_menu_highlight:SetPos( -120, 0 )
  118. cc_menu_highlight:SetSize( 200, 80 )
  119.  
  120. cc_menu_highlight.Paint = function( panel, w, h )
  121.  
  122. draw.RoundedBox( 0, 0, 0, w, h, cc_highlight_color )
  123.  
  124. end
  125.  
  126. local cc_menu_button1 = vgui.Create( "DButton", cc_menu_button_row )
  127. cc_menu_button1:SetSize( 200, 60 )
  128. cc_menu_button1:SetPos( 0, 0 )
  129. cc_menu_button1:SetText( cc_menu_button1_text )
  130. cc_menu_button1:SetFont( "cc_menu_buttons" )
  131. cc_menu_button1:SetColor( cc_text_color )
  132.  
  133. function cc_menu_button1:OnCursorEntered( )
  134.  
  135. cc_menu_highlight:MoveTo( 0, 0, 0.3, 0, -5 )
  136.  
  137. end
  138.  
  139. cc_menu_button1.DoClick = function()
  140.  
  141. cc_menu_frame:Remove()
  142.  
  143. end
  144.  
  145. cc_menu_button1.Paint = function( panel, w, h )
  146.  
  147. draw.RoundedBox( 0, 0, 0, w, h - 3, cc_button_color )
  148.  
  149. end
  150.  
  151. local cc_menu_button2 = vgui.Create( "DButton", cc_menu_button_row )
  152. cc_menu_button2:SetSize( 200, 60 )
  153. cc_menu_button2:SetPos( 200, 0 )
  154. cc_menu_button2:SetText( cc_menu_button2_text )
  155. cc_menu_button2:SetFont( "cc_menu_buttons" )
  156. cc_menu_button2:SetColor( cc_text_color )
  157.  
  158. function cc_menu_button2:OnCursorEntered( )
  159.  
  160. cc_menu_highlight:MoveTo( 200, 0, 0.3, 0, -5 )
  161.  
  162. end
  163.  
  164. cc_menu_button2.DoClick = function()
  165.  
  166. cc_menu_frame:Remove()
  167.  
  168. Character_Creation_Designer()
  169.  
  170. end
  171.  
  172. cc_menu_button2.Paint = function( panel, w, h )
  173.  
  174. draw.RoundedBox( 0, 0, 0, w, h - 3, cc_button_color )
  175.  
  176. end
  177.  
  178. local cc_menu_button3 = vgui.Create( "DButton", cc_menu_button_row )
  179. cc_menu_button3:SetSize( 200, 60 )
  180. cc_menu_button3:SetPos( 200 * 2, 0 )
  181. cc_menu_button3:SetText( cc_menu_button3_text )
  182. cc_menu_button3:SetFont( "cc_menu_buttons" )
  183. cc_menu_button3:SetColor( cc_text_color )
  184.  
  185. function cc_menu_button3:OnCursorEntered( )
  186.  
  187. cc_menu_highlight:MoveTo( 200 * 2, 0, 0.3, 0, -5 )
  188.  
  189. end
  190.  
  191. cc_menu_button3.DoClick = function()
  192.  
  193. cc_menu_frame:Remove()
  194.  
  195. Main_Menu_Create()
  196.  
  197. end
  198.  
  199. cc_menu_button3.Paint = function( panel, w, h )
  200.  
  201. draw.RoundedBox( 0, 0, 0, w, h - 3, cc_button_color )
  202.  
  203. end
  204.  
  205. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement