diff --git a/gamemode/engine/derma/lib/cl_menu_theme.lua b/gamemode/engine/derma/lib/cl_menu_theme.lua index 5138fcb..9d37715 100644 --- a/gamemode/engine/derma/lib/cl_menu_theme.lua +++ b/gamemode/engine/derma/lib/cl_menu_theme.lua @@ -58,8 +58,9 @@ function theme.button( b, color ) draw.RoundedBox( 4, padding_s/2, padding_s/2, w - padding_s, h - padding_s, clr ) -- inner end -function theme.sharpbutton( b ) +function theme.sharpbutton( b, inClr ) local w, h = b:GetSize() + inClr = inClr || Color( 235, 64, 52, 255 ) if( b:IsHovered() ) then surface.SetDrawColor( 205, 205, 205, 255 ) @@ -70,7 +71,7 @@ function theme.sharpbutton( b ) surface.DrawRect( 0, 0, w, h ) - surface.SetDrawColor( 235, 64, 52, 255 ) + surface.SetDrawColor( inClr ) surface.DrawRect( padding_s/2, padding_s/2, w - padding_s, h - padding_s ) end diff --git a/gamemode/engine/derma/menus/menu_character.lua b/gamemode/engine/derma/menus/menu_character.lua index efd11c5..fbb5e64 100644 --- a/gamemode/engine/derma/menus/menu_character.lua +++ b/gamemode/engine/derma/menus/menu_character.lua @@ -45,11 +45,40 @@ local pages = { ip.Paint = function( self ) theme.blurpanel(self) end local inputs = {} - + -- input panel contens -- + local gbuttons = {} + 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:SizeToContents() + gbuttons.male.w, gbuttons.male.h = gbuttons.male:GetSize() + gbuttons.male:SetPos( 0, 0 ) + + local selectedGenderButton = gbuttons.male -- select itself + + gbuttons.male.Paint = function( self ) + if( selectedGenderButton == self ) then + theme.sharpbutton( self, Color( 255, 255, 255 ) ) + end + 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.w, gbuttons.female.h = gbuttons.female:GetSize() + gbuttons.female:SetPos( 50, 0 ) + gbuttons.female.DoClick = function( self ) + + end + + return p, c end }