diff --git a/CHANGELOG.md b/CHANGELOG.md index 68804ef0bb..1ea8a8c250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel - use `net.ReadPlayer` / `net.WritePlayer` if applicable instead of `net.Read|WriteEntity` - Reduced radar bit size for net message - The holdtype for pistol weapons now matches the viewmodel +- Unified the spec color usage throughout the whole UI (by @TimGoll) ### Fixed diff --git a/gamemodes/terrortown/gamemode/client/cl_voice.lua b/gamemodes/terrortown/gamemode/client/cl_voice.lua index 2ecb85d75d..5381a7a2c5 100644 --- a/gamemodes/terrortown/gamemode/client/cl_voice.lua +++ b/gamemodes/terrortown/gamemode/client/cl_voice.lua @@ -179,7 +179,11 @@ end -- @return Color The color of the voice panel -- @realm client function VOICE.GetVoiceColor(ply) - if VOICE.GetVoiceMode(ply) == VOICE_MODE_GLOBAL then + local voiceMode = VOICE.GetVoiceMode(ply) + + if voiceMode == VOICE_MODE_SPEC then + return COLOR_SPEC + elseif voiceMode == VOICE_MODE_GLOBAL then return INNOCENT.color else return TEAMS[ply:GetTeam()].color diff --git a/gamemodes/terrortown/gamemode/client/vgui/cl_sb_main.lua b/gamemodes/terrortown/gamemode/client/vgui/cl_sb_main.lua index efd7c13c2f..298e22a3af 100644 --- a/gamemodes/terrortown/gamemode/client/vgui/cl_sb_main.lua +++ b/gamemodes/terrortown/gamemode/client/vgui/cl_sb_main.lua @@ -202,7 +202,7 @@ function PANEL:Init() self.ply_groups[GROUP_TERROR] = t t = vgui.Create("TTTScoreGroup", self.ply_frame:GetCanvas()) - t:SetGroupInfo(GetTranslation("spectators"), Color(200, 200, 0, 100), GROUP_SPEC) + t:SetGroupInfo(GetTranslation("spectators"), COLOR_SPEC, GROUP_SPEC) self.ply_groups[GROUP_SPEC] = t if DetectiveMode() then diff --git a/gamemodes/terrortown/gamemode/shared/hud_elements/tttinfopanel/pure_skin_playerinfo.lua b/gamemodes/terrortown/gamemode/shared/hud_elements/tttinfopanel/pure_skin_playerinfo.lua index 0f4b2e4671..ca3a04f1fb 100644 --- a/gamemodes/terrortown/gamemode/shared/hud_elements/tttinfopanel/pure_skin_playerinfo.lua +++ b/gamemodes/terrortown/gamemode/shared/hud_elements/tttinfopanel/pure_skin_playerinfo.lua @@ -26,7 +26,6 @@ if CLIENT then local mat_tid_ammo = Material("vgui/ttt/tid/tid_ammo") local color_sprint = Color(36, 154, 198) - local color_defaultgrey = Color(100, 100, 100, 200) local color_health = Color(234, 41, 41) local color_ammoBar = Color(238, 151, 0) @@ -150,7 +149,7 @@ if CLIENT then if cactive then c = client:GetRoleColor() else - c = color_defaultgrey + c = COLOR_SPEC end surface.SetDrawColor(clr(c)) diff --git a/gamemodes/terrortown/gamemode/shared/hud_elements/tttteamindicator/pure_skin_teamindicator.lua b/gamemodes/terrortown/gamemode/shared/hud_elements/tttteamindicator/pure_skin_teamindicator.lua index 803b8aa82b..260e7a558e 100644 --- a/gamemodes/terrortown/gamemode/shared/hud_elements/tttteamindicator/pure_skin_teamindicator.lua +++ b/gamemodes/terrortown/gamemode/shared/hud_elements/tttteamindicator/pure_skin_teamindicator.lua @@ -87,7 +87,7 @@ if CLIENT then c = tm.color or COLOR_BLACK else -- player is dead and spectator icon = material_watching - c = COLOR_WARMGRAY + c = COLOR_SPEC end -- draw dark bottom overlay