diff --git a/gamemode/content/materials/quantum/server_banner.png b/gamemode/content/materials/quantum/server_banner.png new file mode 100644 index 0000000..8cbd93b Binary files /dev/null and b/gamemode/content/materials/quantum/server_banner.png differ diff --git a/gamemode/engine/core/client/cl_fonts.lua b/gamemode/engine/core/client/cl_fonts.lua index 7f0fbe8..7b9f9e7 100644 --- a/gamemode/engine/core/client/cl_fonts.lua +++ b/gamemode/engine/core/client/cl_fonts.lua @@ -30,6 +30,12 @@ surface.CreateFont( "q_button", { antialias = true }) +surface.CreateFont( "q_button2", { + font = "Arial", + size = 35 * Quantum.Client.ResolutionScale, + antialias = true +}) + surface.CreateFont( "q_charNameText", { font = "Arial", outline = true, diff --git a/gamemode/engine/derma/menus/menu_character.lua b/gamemode/engine/derma/menus/menu_character.lua index fbb5e64..68f823c 100644 --- a/gamemode/engine/derma/menus/menu_character.lua +++ b/gamemode/engine/derma/menus/menu_character.lua @@ -51,31 +51,43 @@ local pages = { gbuttons.male = vgui.Create( "DButton", ip ) gbuttons.male:SetText( "M" ) gbuttons.male:SetTextColor( Color( 0, 0, 0, 255 ) ) - gbuttons.male:SetFont( "q_button" ) + gbuttons.male:SetFont( "q_button2" ) gbuttons.male:SizeToContents() gbuttons.male.w, gbuttons.male.h = gbuttons.male:GetSize() - gbuttons.male:SetPos( 0, 0 ) + gbuttons.male:SetPos( (ip.w/2 - padding) - gbuttons.male.w/2, ip.h/2 - gbuttons.male.h/2 ) + gbuttons.male.x, gbuttons.male.y = gbuttons.male:GetPos() local selectedGenderButton = gbuttons.male -- select itself - gbuttons.male.Paint = function( self ) + gbuttons.male.Paint = function( self, w, h ) + theme.sharpbutton( self ) if( selectedGenderButton == self ) then - theme.sharpbutton( self, Color( 255, 255, 255 ) ) + surface.SetDrawColor( 100, 100, 100, 100 ) + surface.DrawRect( 0, 0, w, h ) end end - - + gbuttons.male.DoClick = function( self ) + selectedGenderButton = self + surface.PlaySound( "UI/buttonclick.wav" ) + end gbuttons.female = vgui.Create( "DButton", ip ) gbuttons.female:SetText( "F" ) gbuttons.female:SetTextColor( Color( 0, 0, 0, 255 ) ) - gbuttons.female:SetFont( "q_button" ) - gbuttons.female.Paint = function( self ) theme.sharpbutton( self ) end - gbuttons.female:SizeToContents() + gbuttons.female:SetFont( "q_button2" ) + gbuttons.female.Paint = function( self, w, h ) + theme.sharpbutton( self ) + if( selectedGenderButton == self ) then + surface.SetDrawColor( 100, 100, 100, 100 ) + surface.DrawRect( 0, 0, w, h ) + end + end + gbuttons.female:SetSize( gbuttons.male:GetSize() ) gbuttons.female.w, gbuttons.female.h = gbuttons.female:GetSize() - gbuttons.female:SetPos( 50, 0 ) + gbuttons.female:SetPos( (ip.w/2 + padding) + gbuttons.female.w/2, gbuttons.male.y ) gbuttons.female.DoClick = function( self ) - + selectedGenderButton = self + surface.PlaySound( "UI/buttonclick.wav" ) end @@ -108,6 +120,12 @@ function menu.open( dt ) f.page = p f.page:SetVisible( true ) + local banner = vgui.Create( "DImage", p ) + banner:SetSize( 480 * resScale, 120 * resScale ) + banner:SetImage( "../textures/server_banner.png" ) + banner.w, banner.h = banner:GetSize() + banner:SetPos( padding, padding ) + local clist = vgui.Create( "DScrollPanel", p ) clist:SetSize( 380 * resScale, sh - padding*15 ) clist.w, clist.h = clist:GetSize() diff --git a/gamemode/init.lua b/gamemode/init.lua index 49d2acd..1e589c5 100644 --- a/gamemode/init.lua +++ b/gamemode/init.lua @@ -11,6 +11,10 @@ if SERVER then AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) + -- Content -- + resource.AddFile("content/materials/quantum/server_banner.png") + ------------- + include( "shared.lua" ) Quantum.Server = {}