Fix colors not updating on some text items due to gmod update

Add start of a main / splash menu
This commit is contained in:
JetBoom 2015-03-09 20:14:53 -04:00
parent 33b18089e5
commit 463c1ace11
4 changed files with 10 additions and 0 deletions

View file

@ -28,6 +28,7 @@ include("vgui/dexrotatedimage.lua")
include("vgui/dexnotificationslist.lua")
include("vgui/dexchanginglabel.lua")
include("vgui/mainmenu.lua")
include("vgui/pmainmenu.lua")
include("vgui/poptions.lua")
include("vgui/phelp.lua")

View file

@ -59,6 +59,7 @@ AddCSLuaFile("vgui/dexrotatedimage.lua")
AddCSLuaFile("vgui/dexnotificationslist.lua")
AddCSLuaFile("vgui/dexchanginglabel.lua")
AddCSLuaFile("vgui/mainmenu.lua")
AddCSLuaFile("vgui/pmainmenu.lua")
AddCSLuaFile("vgui/poptions.lua")
AddCSLuaFile("vgui/phelp.lua")

View file

@ -85,10 +85,12 @@ local function ItemPanelThink(self)
if newstate then
self:AlphaTo(255, 0.75, 0)
self.m_NameLabel:SetTextColor(COLOR_WHITE)
self.m_NameLabel:InvalidateLayout()
self.m_BuyButton:SetImage("icon16/accept.png")
else
self:AlphaTo(90, 0.75, 0)
self.m_NameLabel:SetTextColor(COLOR_RED)
self.m_NameLabel:InvalidateLayout()
self.m_BuyButton:SetImage("icon16/exclamation.png")
end

View file

@ -54,10 +54,13 @@ local function CartDoClick(self, silent, force)
pWorth.WorthLab:SetText("Worth: ".. WorthRemaining)
if WorthRemaining <= 0 then
pWorth.WorthLab:SetTextColor(COLOR_RED)
pWorth.WorthLab:InvalidateLayout()
elseif WorthRemaining <= GAMEMODE.StartingWorth * 0.25 then
pWorth.WorthLab:SetTextColor(COLOR_YELLOW)
pWorth.WorthLab:InvalidateLayout()
else
pWorth.WorthLab:SetTextColor(COLOR_LIMEGREEN)
pWorth.WorthLab:InvalidateLayout()
end
pWorth.WorthLab:SizeToContents()
end
@ -497,10 +500,13 @@ function PANEL:DoClick(silent, force)
pWorth.WorthLab:SetText("Worth: ".. WorthRemaining)
if WorthRemaining <= 0 then
pWorth.WorthLab:SetTextColor(COLOR_RED)
pWorth.WorthLab:InvalidateLayout()
elseif WorthRemaining <= GAMEMODE.StartingWorth * 0.25 then
pWorth.WorthLab:SetTextColor(COLOR_YELLOW)
pWorth.WorthLab:InvalidateLayout()
else
pWorth.WorthLab:SetTextColor(COLOR_LIMEGREEN)
pWorth.WorthLab:InvalidateLayout()
end
pWorth.WorthLab:SizeToContents()
end