From 6dee1a3db0acecd8cb90e14b3c32150fbef2da95 Mon Sep 17 00:00:00 2001 From: Fesiug Date: Sun, 12 Nov 2023 04:55:08 -0500 Subject: [PATCH] Tempactive --- gamemodes/benny/gamemode/modules/player/sh_basic.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gamemodes/benny/gamemode/modules/player/sh_basic.lua b/gamemodes/benny/gamemode/modules/player/sh_basic.lua index e381e5c..e816fb8 100644 --- a/gamemodes/benny/gamemode/modules/player/sh_basic.lua +++ b/gamemodes/benny/gamemode/modules/player/sh_basic.lua @@ -170,6 +170,7 @@ if CLIENT then function OpenSMenu() if IsValid( smenu ) then smenu:Remove() return end + local active = GetConVar("benny_hud_tempactive"):GetString() smenu = vgui.Create("DFrame") smenu:SetSize( ss(1+(96+2)*4), ss(360) ) smenu:MakePopup() @@ -177,7 +178,7 @@ if CLIENT then smenu:Center() function smenu:Paint( w, h ) - surface.SetDrawColor( schemes["benny"]["bg"] ) + surface.SetDrawColor( schemes[active]["bg"] ) surface.DrawRect( 0, 0, w, h ) return true end @@ -229,10 +230,10 @@ if CLIENT then end function button:Paint( w, h ) - surface.SetDrawColor( schemes["benny"]["fg"] ) + surface.SetDrawColor( schemes[active]["fg"] ) surface.DrawRect( 0, 0, w, h ) - surface.SetTextColor( schemes["benny"]["bg"] ) + surface.SetTextColor( schemes[active]["bg"] ) surface.SetFont( "Benny_12" ) surface.SetTextPos( ss(2), ss(2) ) @@ -249,6 +250,7 @@ if CLIENT then end local function regen_items( itemlist ) local ply = LocalPlayer() + local active = GetConVar("benny_hud_tempactive"):GetString() itemlist:Clear() for i, v in pairs( ply:INV_Get() ) do @@ -275,10 +277,10 @@ if CLIENT then end function button:Paint( w, h ) - surface.SetDrawColor( schemes["benny"]["fg"] ) + surface.SetDrawColor( schemes[active]["fg"] ) surface.DrawRect( 0, 0, w, h ) - surface.SetTextColor( schemes["benny"]["bg"] ) + surface.SetTextColor( schemes[active]["bg"] ) surface.SetFont( "Benny_16" ) surface.SetTextPos( ss(4), ss(4) )