From 8148796afc8ec93e249b6deeff57a6aec27f56d8 Mon Sep 17 00:00:00 2001 From: gnomerd Date: Fri, 25 Oct 2019 09:00:35 +0200 Subject: [PATCH] Added border panel theme --- gamemode/engine/derma/lib/cl_menu_theme.lua | 8 ++++++++ gamemode/engine/derma/menus/menu_character.lua | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gamemode/engine/derma/lib/cl_menu_theme.lua b/gamemode/engine/derma/lib/cl_menu_theme.lua index 7dd7789..fb08cc4 100644 --- a/gamemode/engine/derma/lib/cl_menu_theme.lua +++ b/gamemode/engine/derma/lib/cl_menu_theme.lua @@ -25,6 +25,14 @@ local function renderBlur( p, a, d ) end end +function theme.borderpanel( p, color ) + local w, h = p:GetSize() + local clr = color || Color( 20, 20, 20, 100 ) + + surface.SetDrawColor( clr ) + surface.DrawOutlinedRect( 0, 0, w, h ) +end + function theme.panel( p, color ) local w, h = p:GetSize() local clr = color || Color( 0, 0, 0, 200 ) diff --git a/gamemode/engine/derma/menus/menu_character.lua b/gamemode/engine/derma/menus/menu_character.lua index 638f511..dd2b1b1 100644 --- a/gamemode/engine/derma/menus/menu_character.lua +++ b/gamemode/engine/derma/menus/menu_character.lua @@ -258,7 +258,9 @@ local pages = { mscroll.w, mscroll.h = mscroll:GetSize() mscroll:SetPos( 0, ip.h - mscroll.h ) mscroll:GetVBar():SetSize( 0, 0 ) - mscroll.Paint = function( self ) theme.panel( self ) end -- temp + mscroll.Paint = function( self ) theme.panel( self ) + theme.borderpanel( self ) + end --- Model viewer