diff --git a/YAS/Classes/KFScoreBoard.uc b/YAS/Classes/KFScoreBoard.uc index 72af7f6..532a8dd 100644 --- a/YAS/Classes/KFScoreBoard.uc +++ b/YAS/Classes/KFScoreBoard.uc @@ -453,6 +453,8 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float local float BorderSize; local int Armor, MaxArmor; + local ColorRGBA HealthBoxColor, ArmorBoxColor, HealthTextColor, ArmorTextColor; + BorderSize = Owner.HUDOwner.ScaledBorderSize; YOffset *= 1.05; @@ -509,49 +511,67 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float else Shape = Settings.Style.ShapeStateHealthBoxMidPlayer; - // Health - Owner.CurrentStyle.DrawRectBox(XPos, - YOffset, - HealthWBox, - Height, - Settings.Style.EdgeSize, - Shape); - if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun) { - SetDrawColor(C, Settings.Style.StateTextColorLobby); + HealthBoxColor = Settings.Style.StateBoxColorLobby; + ArmorBoxColor = Settings.Style.StateBoxColorLobby; + HealthTextColor = Settings.Style.StateTextColorLobby; + ArmorTextColor = Settings.Style.StateTextColorLobby; S = class'KFGFxMenu_ServerBrowser'.default.InLobbyString;; } else if (!KFGRI.bMatchHasBegun) { if (KFPRI.bReadyToPlay) { - SetDrawColor(C, Settings.Style.StateTextColorReady); + HealthBoxColor = Settings.Style.StateBoxColorReady; + ArmorBoxColor = Settings.Style.StateBoxColorReady; + HealthTextColor = Settings.Style.StateBoxColorReady; + ArmorTextColor = Settings.Style.StateBoxColorReady; S = Ready; } else { - SetDrawColor(C, Settings.Style.StateTextColorNotReady); + HealthBoxColor = Settings.Style.StateBoxColorNotReady; + ArmorBoxColor = Settings.Style.StateBoxColorNotReady; + HealthTextColor = Settings.Style.StateBoxColorNotReady; + ArmorTextColor = Settings.Style.StateBoxColorNotReady; S = NotReady; } } else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None) { - SetDrawColor(C, Settings.Style.StateTextColorHealthUnknown); + HealthBoxColor = Settings.Style.StateTextColorNone; + ArmorBoxColor = Settings.Style.StateTextColorNone; + HealthTextColor = Settings.Style.StateTextColorNone; + ArmorTextColor = Settings.Style.StateTextColorNone; S = Unknown; } else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0) { if (KFPRI.bOnlySpectator) { - SetDrawColor(C, Settings.Style.StateTextColorSpectator); + HealthBoxColor = Settings.Style.StateTextColorSpectator; + ArmorBoxColor = Settings.Style.StateTextColorSpectator; + HealthTextColor = Settings.Style.StateTextColorSpectator; + ArmorTextColor = Settings.Style.StateTextColorSpectator; S = class'KFCommon_LocalizedStrings'.default.SpectatorString; } else { - SetDrawColor(C, Settings.Style.StateTextColorDead); + HealthBoxColor = Settings.Style.StateTextColorDead; + ArmorBoxColor = Settings.Style.StateTextColorDead; + HealthTextColor = Settings.Style.StateTextColorDead; + ArmorTextColor = Settings.Style.StateTextColorDead; S = Dead; } + + // Health + Owner.CurrentStyle.DrawRectBox(XPos, + YOffset, + HealthWBox, + Height, + Settings.Style.EdgeSize, + Shape); } else { diff --git a/YAS/Classes/ScoreboardStyle.uc b/YAS/Classes/ScoreboardStyle.uc index 06beb8d..f047c21 100644 --- a/YAS/Classes/ScoreboardStyle.uc +++ b/YAS/Classes/ScoreboardStyle.uc @@ -51,6 +51,7 @@ var config ColorRGBA StateBoxColorReady; var config ColorRGBA StateBoxColorNotReady; var config ColorRGBA StateBoxColorSpectator; var config ColorRGBA StateBoxColorDead; +var config ColorRGBA StateBoxColorNone; var config ColorRGBA StateBoxColorHealthLow; var config ColorRGBA StateBoxColorHealthMid; var config ColorRGBA StateBoxColorHealthHigh; @@ -72,7 +73,7 @@ var config ColorRGBA StateTextColorReady; var config ColorRGBA StateTextColorNotReady; var config ColorRGBA StateTextColorSpectator; var config ColorRGBA StateTextColorDead; -var config ColorRGBA StateTextColorHealthUnknown; +var config ColorRGBA StateTextColorNone; var config ColorRGBA StateTextColorHealthLow; var config ColorRGBA StateTextColorHealthMid; var config ColorRGBA StateTextColorHealthHigh; @@ -187,6 +188,7 @@ public static function InitConfig(int ConfigVersion) default.StateBoxColorArmorLow = DefaultStyle.StateBoxColorArmorLow; default.StateBoxColorArmorMid = DefaultStyle.StateBoxColorArmorMid; default.StateBoxColorDead = DefaultStyle.StateBoxColorDead; + default.StateBoxColorNone = DefaultStyle.StateBoxColorNone; default.StateBoxColorHealthHigh = DefaultStyle.StateBoxColorHealthHigh; default.StateBoxColorHealthLow = DefaultStyle.StateBoxColorHealthLow; default.StateBoxColorHealthMid = DefaultStyle.StateBoxColorHealthMid; @@ -197,7 +199,7 @@ public static function InitConfig(int ConfigVersion) default.StateTextColorArmorHigh = DefaultStyle.StateTextColorArmorHigh; default.StateTextColorArmorLow = DefaultStyle.StateTextColorArmorLow; default.StateTextColorArmorMid = DefaultStyle.StateTextColorArmorMid; - default.StateTextColorHealthUnknown = DefaultStyle.StateTextColorHealthUnknown; + default.StateTextColorNone = DefaultStyle.StateTextColorNone; default.StateTextColorHealthHigh = DefaultStyle.StateTextColorHealthHigh; default.StateTextColorHealthLow = DefaultStyle.StateTextColorHealthLow; default.StateTextColorHealthMid = DefaultStyle.StateTextColorHealthMid; @@ -278,6 +280,7 @@ public static function YASStyle Settings() Settings.StateBoxColorNotReady = default.StateBoxColorNotReady; Settings.StateBoxColorSpectator = default.StateBoxColorSpectator; Settings.StateBoxColorDead = default.StateBoxColorDead; + Settings.StateBoxColorNone = default.StateBoxColorNone; Settings.StateBoxColorHealthLow = default.StateBoxColorHealthLow; Settings.StateBoxColorHealthMid = default.StateBoxColorHealthMid; Settings.StateBoxColorHealthHigh = default.StateBoxColorHealthHigh; @@ -299,7 +302,7 @@ public static function YASStyle Settings() Settings.StateTextColorNotReady = default.StateTextColorNotReady; Settings.StateTextColorSpectator = default.StateTextColorSpectator; Settings.StateTextColorDead = default.StateTextColorDead; - Settings.StateTextColorHealthUnknown = default.StateTextColorHealthUnknown; + Settings.StateTextColorNone = default.StateTextColorNone; Settings.StateTextColorHealthLow = default.StateTextColorHealthLow; Settings.StateTextColorHealthMid = default.StateTextColorHealthMid; Settings.StateTextColorHealthHigh = default.StateTextColorHealthHigh; @@ -354,16 +357,16 @@ public static function YASStyle Settings() Settings.PingTextColorHigh = default.PingTextColorHigh; // Other settings - Settings.ShowPingBars = default.bShowPingBars; - Settings.HealthBoxSmoothColorChange = default.bHealthBoxSmoothColorChange; - Settings.ArmorBoxSmoothColorChange = default.bArmorBoxSmoothColorChange; - Settings.HealthTextSmoothColorChange = default.bHealthTextSmoothColorChange; - Settings.ArmorTextSmoothColorChange = default.bArmorTextSmoothColorChange; - Settings.LevelTextSmoothColorChange = default.bLevelTextSmoothColorChange; - Settings.DoshTextSmoothColorChange = default.bDoshTextSmoothColorChange; - Settings.KillsTextSmoothColorChange = default.bKillsTextSmoothColorChange; - Settings.AssistsTextSmoothColorChange = default.bAssistsTextSmoothColorChange; - Settings.PingTextSmoothColorChange = default.bPingTextSmoothColorChange; + Settings.ShowPingBars = default.bShowPingBars; + Settings.HealthBoxSmoothColorChange = default.bHealthBoxSmoothColorChange; + Settings.ArmorBoxSmoothColorChange = default.bArmorBoxSmoothColorChange; + Settings.HealthTextSmoothColorChange = default.bHealthTextSmoothColorChange; + Settings.ArmorTextSmoothColorChange = default.bArmorTextSmoothColorChange; + Settings.LevelTextSmoothColorChange = default.bLevelTextSmoothColorChange; + Settings.DoshTextSmoothColorChange = default.bDoshTextSmoothColorChange; + Settings.KillsTextSmoothColorChange = default.bKillsTextSmoothColorChange; + Settings.AssistsTextSmoothColorChange = default.bAssistsTextSmoothColorChange; + Settings.PingTextSmoothColorChange = default.bPingTextSmoothColorChange; return Settings; } @@ -418,6 +421,7 @@ public static function WriteSettings(YASStyle Settings) default.StateBoxColorNotReady = Settings.StateBoxColorNotReady; default.StateBoxColorSpectator = Settings.StateBoxColorSpectator; default.StateBoxColorDead = Settings.StateBoxColorDead; + default.StateBoxColorNone = Settings.StateBoxColorNone; default.StateBoxColorHealthLow = Settings.StateBoxColorHealthLow; default.StateBoxColorHealthMid = Settings.StateBoxColorHealthMid; default.StateBoxColorHealthHigh = Settings.StateBoxColorHealthHigh; @@ -439,7 +443,7 @@ public static function WriteSettings(YASStyle Settings) default.StateTextColorNotReady = Settings.StateTextColorNotReady; default.StateTextColorSpectator = Settings.StateTextColorSpectator; default.StateTextColorDead = Settings.StateTextColorDead; - default.StateTextColorHealthUnknown = Settings.StateTextColorHealthUnknown; + default.StateTextColorNone = Settings.StateTextColorNone; default.StateTextColorHealthLow = Settings.StateTextColorHealthLow; default.StateTextColorHealthMid = Settings.StateTextColorHealthMid; default.StateTextColorHealthHigh = Settings.StateTextColorHealthHigh; diff --git a/YAS/Classes/Types.uc b/YAS/Classes/Types.uc index b9624e2..85e9d29 100644 --- a/YAS/Classes/Types.uc +++ b/YAS/Classes/Types.uc @@ -205,6 +205,7 @@ struct YASStyle var ColorRGBA StateBoxColorNotReady; var ColorRGBA StateBoxColorSpectator; var ColorRGBA StateBoxColorDead; + var ColorRGBA StateBoxColorNone; var ColorRGBA StateBoxColorHealthLow; var ColorRGBA StateBoxColorHealthMid; var ColorRGBA StateBoxColorHealthHigh; @@ -226,7 +227,7 @@ struct YASStyle var ColorRGBA StateTextColorNotReady; var ColorRGBA StateTextColorSpectator; var ColorRGBA StateTextColorDead; - var ColorRGBA StateTextColorHealthUnknown; + var ColorRGBA StateTextColorNone; var ColorRGBA StateTextColorHealthLow; var ColorRGBA StateTextColorHealthMid; var ColorRGBA StateTextColorHealthHigh; @@ -341,7 +342,7 @@ struct YASStyle StateBoxColorNotReady = (R=150, G=150, B=150, A=150) StateBoxColorSpectator = (R=150, G=150, B=150, A=150) StateBoxColorDead = (R=200, G=0, B=0, A=150) - StateTextColorHealthUnknown = (R=150, G=150, B=150, A=150) + StateBoxColorNone = (R=150, G=150, B=150, A=150) StateBoxColorHealthLow = (R=200, G=50, B=50, A=150) StateBoxColorHealthMid = (R=200, G=200, B=0, A=150) StateBoxColorHealthHigh = (R=0, G=200, B=0, A=150) @@ -363,6 +364,7 @@ struct YASStyle StateTextColorNotReady = (R=150, G=150, B=150, A=150) StateTextColorSpectator = (R=150, G=150, B=150, A=150) StateTextColorDead = (R=250, G=0, B=0, A=255) + StateTextColorNone = (R=250, G=250, B=250, A=255) StateTextColorHealthLow = (R=250, G=250, B=250, A=255) StateTextColorHealthMid = (R=250, G=250, B=250, A=255) StateTextColorHealthHigh = (R=250, G=250, B=250, A=255)