diff --git a/ScoreboardExt/Classes/KFScoreBoard.uc b/ScoreboardExt/Classes/KFScoreBoard.uc index 1710044..91676e8 100644 --- a/ScoreboardExt/Classes/KFScoreBoard.uc +++ b/ScoreboardExt/Classes/KFScoreBoard.uc @@ -22,11 +22,11 @@ var array PlayerGroups; var array PlayerInfos; var string SystemAdminRank; -var TextColor SystemAdminColor; +var ColorRGB SystemAdminColor; var Fields SystemAdminApplyColorToFields; var string SystemPlayerRank; -var TextColor SystemPlayerColor; +var ColorRGB SystemPlayerColor; var Fields SystemPlayerApplyColorToFields; function InitMenu() @@ -349,7 +349,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa if (!HasGroup || (HasGroup && !Group.OverrideAdminRank)) { Group.Rank = SystemAdminRank; - Group.Color = SystemAdminColor; + Group.TextColor = SystemAdminColor; Group.ApplyColorToFields = SystemAdminApplyColorToFields; HasGroup = true; } @@ -359,7 +359,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa if (!HasGroup) { Group.Rank = SystemPlayerRank; - Group.Color = SystemPlayerColor; + Group.TextColor = SystemPlayerColor; Group.ApplyColorToFields = SystemPlayerApplyColorToFields; HasGroup = true; } @@ -437,7 +437,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa // Rank if (Group.ApplyColorToFields.Rank) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); S = Group.Rank; DrawTextShadowHLeftVCenter(S, RankXPos, TextYOffset, FontScalar); C.SetDrawColor(250,250,250,255); @@ -447,7 +447,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa { C.SetDrawColor(255,0,0,255); if (Group.ApplyColorToFields.Perk) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); C.SetPos (PerkXPos, YOffset - ((Height-5) * 0.5f)); C.DrawRect (Height-5, Height-5, Texture2D'UI_Widgets.MenuBarWidget_SWF_IF'); @@ -483,7 +483,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa C.SetDrawColor(250,250,250,255); if (Group.ApplyColorToFields.Perk) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); S = Level@KFPRI.CurrentPerkClass.default.PerkName; DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar); } @@ -491,7 +491,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa { C.SetDrawColor(250,250,250,255); if (Group.ApplyColorToFields.Perk) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); S = "No Perk"; DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar); } @@ -515,7 +515,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa // Player if (Group.ApplyColorToFields.Player) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); if( Len(KFPRI.PlayerName) > 25 ) S = Left(KFPRI.PlayerName, 25); else S = KFPRI.PlayerName; @@ -525,13 +525,13 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa // Kill if (Group.ApplyColorToFields.Kills) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); DrawTextShadowHVCenter(string (KFPRI.Kills), KillsXPos, TextYOffset, KillsWBox, FontScalar); C.SetDrawColor(250,250,250,255); // Assist if (Group.ApplyColorToFields.Assists) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); DrawTextShadowHVCenter(string (KFPRI.Assists), AssistXPos, TextYOffset, AssistWBox, FontScalar); C.SetDrawColor(250,250,250,255); @@ -547,7 +547,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa StrValue = GetNiceSize(int(KFPRI.Score)); } if (Group.ApplyColorToFields.Dosh) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); DrawTextShadowHVCenter(StrValue, CashXPos, TextYOffset, CashWBox, FontScalar); C.SetDrawColor(250,250,250,255); @@ -586,7 +586,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa } if (Group.ApplyColorToFields.Health) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); DrawTextShadowHVCenter(S, HealthXPos, TextYOffset, HealthWBox, FontScalar); C.SetDrawColor(250,250,250,255); @@ -609,7 +609,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa C.TextSize(MaxPing, XL, YL, FontScalar, FontScalar); if (Group.ApplyColorToFields.Ping) - C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); + C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255); DrawTextShadowHVCenter(S, PingXPos, TextYOffset, PingWBox/2, FontScalar); C.SetDrawColor(250,250,250,255); diff --git a/ScoreboardExt/Classes/ScoreboardExtMut.uc b/ScoreboardExt/Classes/ScoreboardExtMut.uc index b96a375..98b5683 100644 --- a/ScoreboardExt/Classes/ScoreboardExtMut.uc +++ b/ScoreboardExt/Classes/ScoreboardExtMut.uc @@ -52,43 +52,43 @@ private function InitConfig() SaveConfig(); // because I want the main settings to be at the beginning of the config :) // Default admin rank - class'SystemAdminGroup'.default.Rank = "Admin"; - class'SystemAdminGroup'.default.Color.R = 250; - class'SystemAdminGroup'.default.Color.G = 0; - class'SystemAdminGroup'.default.Color.B = 0; + class'SystemAdminGroup'.default.Rank = "Admin"; + class'SystemAdminGroup'.default.TextColor.R = 250; + class'SystemAdminGroup'.default.TextColor.G = 0; + class'SystemAdminGroup'.default.TextColor.B = 0; // Default player rank - class'SystemPlayerGroup'.default.Rank = "Player"; - class'SystemPlayerGroup'.default.Color.R = 250; - class'SystemPlayerGroup'.default.Color.G = 250; - class'SystemPlayerGroup'.default.Color.B = 250; + class'SystemPlayerGroup'.default.Rank = "Player"; + class'SystemPlayerGroup'.default.TextColor.R = 250; + class'SystemPlayerGroup'.default.TextColor.G = 250; + class'SystemPlayerGroup'.default.TextColor.B = 250; // Example rank for player(s) - ExampleGroup.ID = 0; - ExampleGroup.Rank = "SCE Creator"; - ExampleGroup.Color.R = 130; - ExampleGroup.Color.G = 250; - ExampleGroup.Color.B = 235; - ExampleGroup.OverrideAdminRank = true; + ExampleGroup.ID = 0; + ExampleGroup.Rank = "SCE Creator"; + ExampleGroup.TextColor.R = 130; + ExampleGroup.TextColor.G = 250; + ExampleGroup.TextColor.B = 235; + ExampleGroup.OverrideAdminRank = true; class'PlayerGroups'.default.PlayerGroup.AddItem(ExampleGroup); // Example player - ExamplePlayer.PlayerID = "76561198001617867"; // GenZmeY SteamID64 - ExamplePlayer.GroupID = ExampleGroup.ID; + ExamplePlayer.PlayerID = "76561198001617867"; // GenZmeY SteamID64 + ExamplePlayer.GroupID = ExampleGroup.ID; class'PlayerInfos'.default.PlayerInfo.AddItem(ExamplePlayer); // Example rank for steam group members - ExampleGroup.ID = 1; - ExampleGroup.Rank = "[MSK-GS]"; - ExampleGroup.Color.R = 130; - ExampleGroup.Color.G = 250; - ExampleGroup.Color.B = 130; - ExampleGroup.OverrideAdminRank = false; + ExampleGroup.ID = 1; + ExampleGroup.Rank = "[MSK-GS]"; + ExampleGroup.TextColor.R = 130; + ExampleGroup.TextColor.G = 250; + ExampleGroup.TextColor.B = 130; + ExampleGroup.OverrideAdminRank = false; class'PlayerGroups'.default.PlayerGroup.AddItem(ExampleGroup); // Example steam group - ExampleSteamGroup.SteamGroupID = "103582791465384046"; // MSK-GS SteamID64 - ExampleSteamGroup.GroupID = ExampleGroup.ID; + ExampleSteamGroup.SteamGroupID = "103582791465384046"; // MSK-GS SteamID64 + ExampleSteamGroup.GroupID = ExampleGroup.ID; class'SteamGroups'.default.SteamGroup.AddItem(ExampleSteamGroup); class'SystemAdminGroup'.static.StaticSaveConfig(); @@ -156,10 +156,10 @@ function AddPlayerInfo(Controller C) RepClient.RepInfo.PlayerInfos = UIDInfos; RepClient.RepInfo.PlayerGroups = class'PlayerGroups'.default.PlayerGroup; RepClient.RepInfo.SystemAdminRank = class'SystemAdminGroup'.default.Rank; - RepClient.RepInfo.SystemAdminColor = class'SystemAdminGroup'.default.Color; + RepClient.RepInfo.SystemAdminColor = class'SystemAdminGroup'.default.TextColor; RepClient.RepInfo.SystemAdminApplyColorToFields = class'SystemAdminGroup'.default.ApplyColorToFields; RepClient.RepInfo.SystemPlayerRank = class'SystemPlayerGroup'.default.Rank; - RepClient.RepInfo.SystemPlayerColor = class'SystemPlayerGroup'.default.Color; + RepClient.RepInfo.SystemPlayerColor = class'SystemPlayerGroup'.default.TextColor; RepClient.RepInfo.SystemPlayerApplyColorToFields = class'SystemPlayerGroup'.default.ApplyColorToFields; RepClient.RepInfo.ClientStartReplication(); diff --git a/ScoreboardExt/Classes/ScoreboardExtRepInfo.uc b/ScoreboardExt/Classes/ScoreboardExtRepInfo.uc index 54ecff5..519286c 100644 --- a/ScoreboardExt/Classes/ScoreboardExtRepInfo.uc +++ b/ScoreboardExt/Classes/ScoreboardExtRepInfo.uc @@ -4,11 +4,11 @@ var public array PlayerInfos; var public array PlayerGroups; var public string SystemAdminRank; -var public TextColor SystemAdminColor; +var public ColorRGB SystemAdminColor; var public Fields SystemAdminApplyColorToFields; var public string SystemPlayerRank; -var public TextColor SystemPlayerColor; +var public ColorRGB SystemPlayerColor; var public Fields SystemPlayerApplyColorToFields; var private bool SystemFinished, GroupsFinished, InfosFinished; @@ -96,10 +96,10 @@ private reliable client final function InfosReplicationFinished() private reliable client final function ClientInitSystem( string _SystemAdminRank, - TextColor _SystemAdminColor, + ColorRGB _SystemAdminColor, Fields _SystemAdminApplyColorToFields, string _SystemPlayerRank, - TextColor _SystemPlayerColor, + ColorRGB _SystemPlayerColor, Fields _SystemPlayerApplyColorToFields) { SystemAdminRank = _SystemAdminRank; diff --git a/ScoreboardExt/Classes/SystemAdminGroup.uc b/ScoreboardExt/Classes/SystemAdminGroup.uc index 4087fd1..1e56a65 100644 --- a/ScoreboardExt/Classes/SystemAdminGroup.uc +++ b/ScoreboardExt/Classes/SystemAdminGroup.uc @@ -3,5 +3,5 @@ class SystemAdminGroup extends Object config(ScoreboardExt); var config string Rank; -var config TextColor Color; +var config ColorRGB TextColor; var config Fields ApplyColorToFields; diff --git a/ScoreboardExt/Classes/SystemPlayerGroup.uc b/ScoreboardExt/Classes/SystemPlayerGroup.uc index 90eb329..6d25a85 100644 --- a/ScoreboardExt/Classes/SystemPlayerGroup.uc +++ b/ScoreboardExt/Classes/SystemPlayerGroup.uc @@ -3,5 +3,5 @@ class SystemPlayerGroup extends Object config(ScoreboardExt); var config string Rank; -var config TextColor Color; +var config ColorRGB TextColor; var config Fields ApplyColorToFields; diff --git a/ScoreboardExt/Classes/Types.uc b/ScoreboardExt/Classes/Types.uc index 3b7ea70..a147e1a 100644 --- a/ScoreboardExt/Classes/Types.uc +++ b/ScoreboardExt/Classes/Types.uc @@ -1,6 +1,6 @@ class Types extends Object; -struct TextColor +struct ColorRGB { var byte R, G, B; @@ -12,6 +12,19 @@ struct TextColor } }; +struct ColorRGBA +{ + var byte R, G, B, A; + + StructDefaultProperties + { + R=250 + G=250 + B=250 + A=255 + } +}; + struct Fields { var bool Rank; @@ -40,7 +53,7 @@ struct PlayerGroupEntry { var int ID; var string Rank; - var TextColor Color; + var ColorRGB TextColor; var bool OverrideAdminRank; var Fields ApplyColorToFields; };