This commit is contained in:
GenZmeY 2021-07-05 06:53:26 +03:00
parent 8ebf92f710
commit 446d327df7
6 changed files with 405 additions and 405 deletions

View File

@ -34,6 +34,8 @@ public static function InitConfig(int ConfigVersion)
ExampleRank.OverrideAdminRank = false; ExampleRank.OverrideAdminRank = false;
default.Rank.AddItem(ExampleRank); default.Rank.AddItem(ExampleRank);
case 1:
case 2147483647: case 2147483647:
StaticSaveConfig(); StaticSaveConfig();
} }

View File

@ -502,39 +502,12 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
Canvas.TextSize("ABC", XL, YL, FontScalar, FontScalar); Canvas.TextSize("ABC", XL, YL, FontScalar, FontScalar);
TextYOffset = YOffset + (Height * 0.5f) - (YL * 0.5f); TextYOffset = YOffset + (Height * 0.5f) - (YL * 0.5f);
// change rect color by HP
if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun)
{
SetDrawColor(C, Settings.Style.LeftStateBoxColor);
}
else if (!KFGRI.bMatchHasBegun)
{
SetDrawColor(C, Settings.Style.LeftStateBoxColor);
}
else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None)
{
SetDrawColor(C, Settings.Style.LeftStateBoxColor);
}
else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0)
{
SetDrawColor(C, Settings.Style.LeftStateBoxColorDead);
}
else
{
if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.State.High) / 100.0)
SetDrawColor(C, Settings.Style.LeftStateBoxColorHigh);
else if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.State.Low) / 100.0)
SetDrawColor(C, Settings.Style.LeftStateBoxColorMid);
else
SetDrawColor(C, Settings.Style.LeftStateBoxColorLow);
}
if (KFPRIArray.Length > 1 && Index == 0) if (KFPRIArray.Length > 1 && Index == 0)
Shape = Settings.Style.ShapeLeftStateBoxTopPlayer; Shape = Settings.Style.ShapeStateHealthBoxTopPlayer;
else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1) else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1)
Shape = Settings.Style.ShapeLeftStateBoxBottomPlayer; Shape = Settings.Style.ShapeStateHealthBoxBottomPlayer;
else else
Shape = Settings.Style.ShapeLeftStateBoxMidPlayer; Shape = Settings.Style.ShapeStateHealthBoxMidPlayer;
// Health // Health
Owner.CurrentStyle.DrawRectBox(XPos, Owner.CurrentStyle.DrawRectBox(XPos,
@ -564,7 +537,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
} }
else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None) else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None)
{ {
SetDrawColor(C, Settings.Style.StateTextColor); SetDrawColor(C, Settings.Style.StateTextColorHealthUnknown);
S = Unknown; S = Unknown;
} }
else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0) else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0)
@ -582,12 +555,12 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
} }
else else
{ {
if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.State.High) / 100.0) if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.Health.High) / 100.0)
SetDrawColor(C, Settings.Style.StateTextColorHighHP); SetDrawColor(C, Settings.Style.StateTextColorHealthHigh);
else if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.State.Low) / 100.0) else if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.Health.Low) / 100.0)
SetDrawColor(C, Settings.Style.StateTextColorMidHP); SetDrawColor(C, Settings.Style.StateTextColorHealthMid);
else else
SetDrawColor(C, Settings.Style.StateTextColorLowHP); SetDrawColor(C, Settings.Style.StateTextColorHealthLow);
S = String(KFPRI.PlayerHealth); S = String(KFPRI.PlayerHealth);
} }
@ -724,8 +697,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
if (CurrentRank.ApplyColorToFields.Level) if (CurrentRank.ApplyColorToFields.Level)
SetDrawColor(C, CurrentRank.TextColor); SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.LevelTextColor);
S = KFPRI.CurrentPerkClass.default.PerkName; S = KFPRI.CurrentPerkClass.default.PerkName;
DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar); DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar);
} }
@ -733,8 +704,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
{ {
if (CurrentRank.ApplyColorToFields.Perk) if (CurrentRank.ApplyColorToFields.Perk)
SetDrawColor(C, CurrentRank.TextColor); SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.PerkTextColor);
S = NoPerk; S = NoPerk;
DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar); DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar);
RealPlayerWBox = PerkXPos - PlayerXPos; RealPlayerWBox = PerkXPos - PlayerXPos;
@ -772,15 +741,11 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
// Kill // Kill
if (CurrentRank.ApplyColorToFields.Kills) if (CurrentRank.ApplyColorToFields.Kills)
SetDrawColor(C, CurrentRank.TextColor); SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.KillsTextColor);
DrawTextShadowHVCenter(string (KFPRI.Kills), KillsXPos, TextYOffset, KillsWBox, FontScalar); DrawTextShadowHVCenter(string (KFPRI.Kills), KillsXPos, TextYOffset, KillsWBox, FontScalar);
// Assist // Assist
if (CurrentRank.ApplyColorToFields.Assists) if (CurrentRank.ApplyColorToFields.Assists)
SetDrawColor(C, CurrentRank.TextColor); SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.AssistsTextColor);
DrawTextShadowHVCenter(string (KFPRI.Assists), AssistXPos, TextYOffset, AssistWBox, FontScalar); DrawTextShadowHVCenter(string (KFPRI.Assists), AssistXPos, TextYOffset, AssistWBox, FontScalar);
// Dosh // Dosh
@ -793,8 +758,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
{ {
if (CurrentRank.ApplyColorToFields.Dosh) if (CurrentRank.ApplyColorToFields.Dosh)
SetDrawColor(C, CurrentRank.TextColor); SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.DoshTextColor);
StrValue = String(int(KFPRI.Score)); //StrValue = GetNiceSize(int(KFPRI.Score)); StrValue = String(int(KFPRI.Score)); //StrValue = GetNiceSize(int(KFPRI.Score));
} }
DrawTextShadowHVCenter(StrValue, DoshXPos, TextYOffset, DoshWBox, FontScalar); DrawTextShadowHVCenter(StrValue, DoshXPos, TextYOffset, DoshWBox, FontScalar);
@ -802,7 +765,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
// Ping // Ping
if (KFPRI.bBot) if (KFPRI.bBot)
{ {
SetDrawColor(C, Settings.Style.PingTextColor); SetDrawColor(C, Settings.Style.PingTextColorNone);
S = "-"; S = "-";
} }
else else
@ -822,9 +785,9 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
} }
C.TextSize(S, XL, YL, FontScalar, FontScalar); C.TextSize(S, XL, YL, FontScalar, FontScalar);
DrawTextShadowHVCenter(S, PingXPos, TextYOffset, Settings.Ping.ShowPingBars ? PingWBox/2 : PingWBox, FontScalar); DrawTextShadowHVCenter(S, PingXPos, TextYOffset, Settings.Style.ShowPingBars ? PingWBox/2 : PingWBox, FontScalar);
C.SetDrawColor(250, 250, 250, 255); C.SetDrawColor(250, 250, 250, 255);
if (Settings.Ping.ShowPingBars) if (Settings.Style.ShowPingBars)
DrawPingBars(C, YOffset + (Height/2) - ((Height*0.5)/2), Width - (Height*0.5) - (BorderSize*2), Height*0.5, Height*0.5, float(Ping)); DrawPingBars(C, YOffset + (Height/2) - ((Height*0.5)/2), Width - (Height*0.5) - (BorderSize*2), Height*0.5, Height*0.5, float(Ping));
} }

View File

@ -12,9 +12,12 @@ var config int ShapeGameInfoBox;
var config int ShapeWaveInfoBox; var config int ShapeWaveInfoBox;
var config int ShapePlayersCountBox; var config int ShapePlayersCountBox;
var config int ShapeHeaderBox; var config int ShapeHeaderBox;
var config int ShapeLeftStateBoxTopPlayer; var config int ShapeStateHealthBoxTopPlayer;
var config int ShapeLeftStateBoxMidPlayer; var config int ShapeStateHealthBoxMidPlayer;
var config int ShapeLeftStateBoxBottomPlayer; var config int ShapeStateHealthBoxBottomPlayer;
var config int ShapeStateArmorBoxTopPlayer;
var config int ShapeStateArmorBoxMidPlayer;
var config int ShapeStateArmorBoxBottomPlayer;
var config int ShapePlayerBoxTopPlayer; var config int ShapePlayerBoxTopPlayer;
var config int ShapePlayerBoxMidPlayer; var config int ShapePlayerBoxMidPlayer;
var config int ShapePlayerBoxBottomPlayer; var config int ShapePlayerBoxBottomPlayer;
@ -48,9 +51,9 @@ var config ColorRGBA StateBoxColorReady;
var config ColorRGBA StateBoxColorNotReady; var config ColorRGBA StateBoxColorNotReady;
var config ColorRGBA StateBoxColorSpectator; var config ColorRGBA StateBoxColorSpectator;
var config ColorRGBA StateBoxColorDead; var config ColorRGBA StateBoxColorDead;
var config ColorRGBA StateBoxColorHPLow; var config ColorRGBA StateBoxColorHealthLow;
var config ColorRGBA StateBoxColorHPMid; var config ColorRGBA StateBoxColorHealthMid;
var config ColorRGBA StateBoxColorHPHigh; var config ColorRGBA StateBoxColorHealthHigh;
var config ColorRGBA StateBoxColorArmorLow; var config ColorRGBA StateBoxColorArmorLow;
var config ColorRGBA StateBoxColorArmorMid; var config ColorRGBA StateBoxColorArmorMid;
var config ColorRGBA StateBoxColorArmorHigh; var config ColorRGBA StateBoxColorArmorHigh;
@ -69,9 +72,10 @@ var config ColorRGBA StateTextColorReady;
var config ColorRGBA StateTextColorNotReady; var config ColorRGBA StateTextColorNotReady;
var config ColorRGBA StateTextColorSpectator; var config ColorRGBA StateTextColorSpectator;
var config ColorRGBA StateTextColorDead; var config ColorRGBA StateTextColorDead;
var config ColorRGBA StateTextColorHPLow; var config ColorRGBA StateTextColorHealthUnknown;
var config ColorRGBA StateTextColorHPMid; var config ColorRGBA StateTextColorHealthLow;
var config ColorRGBA StateTextColorHPHigh; var config ColorRGBA StateTextColorHealthMid;
var config ColorRGBA StateTextColorHealthHigh;
var config ColorRGBA StateTextColorArmorLow; var config ColorRGBA StateTextColorArmorLow;
var config ColorRGBA StateTextColorArmorMid; var config ColorRGBA StateTextColorArmorMid;
var config ColorRGBA StateTextColorArmorHigh; var config ColorRGBA StateTextColorArmorHigh;
@ -117,6 +121,7 @@ var config ColorRGBA AssistsTextColorMid;
var config ColorRGBA AssistsTextColorHigh; var config ColorRGBA AssistsTextColorHigh;
// Ping text // Ping text
var config ColorRGBA PingTextColorNone;
var config ColorRGBA PingTextColorLow; var config ColorRGBA PingTextColorLow;
var config ColorRGBA PingTextColorMid; var config ColorRGBA PingTextColorMid;
var config ColorRGBA PingTextColorHigh; var config ColorRGBA PingTextColorHigh;
@ -148,16 +153,16 @@ public static function InitConfig(int ConfigVersion)
default.AssistsTextColorHigh = DefaultStyle.AssistsTextColorHigh; default.AssistsTextColorHigh = DefaultStyle.AssistsTextColorHigh;
default.AssistsTextColorLow = DefaultStyle.AssistsTextColorLow; default.AssistsTextColorLow = DefaultStyle.AssistsTextColorLow;
default.AssistsTextColorMid = DefaultStyle.AssistsTextColorMid; default.AssistsTextColorMid = DefaultStyle.AssistsTextColorMid;
default.bArmorBoxSmoothColorChange = DefaultStyle.bArmorBoxSmoothColorChange; default.bArmorBoxSmoothColorChange = DefaultStyle.ArmorBoxSmoothColorChange;
default.bArmorTextSmoothColorChange = DefaultStyle.bArmorTextSmoothColorChange; default.bArmorTextSmoothColorChange = DefaultStyle.ArmorTextSmoothColorChange;
default.bAssistsTextSmoothColorChange = DefaultStyle.bAssistsTextSmoothColorChange; default.bAssistsTextSmoothColorChange = DefaultStyle.AssistsTextSmoothColorChange;
default.bDoshTextSmoothColorChange = DefaultStyle.bDoshTextSmoothColorChange; default.bDoshTextSmoothColorChange = DefaultStyle.DoshTextSmoothColorChange;
default.bHealthBoxSmoothColorChange = DefaultStyle.bHealthBoxSmoothColorChange; default.bHealthBoxSmoothColorChange = DefaultStyle.HealthBoxSmoothColorChange;
default.bHealthTextSmoothColorChange = DefaultStyle.bHealthTextSmoothColorChange; default.bHealthTextSmoothColorChange = DefaultStyle.HealthTextSmoothColorChange;
default.bKillsTextSmoothColorChange = DefaultStyle.bKillsTextSmoothColorChange; default.bKillsTextSmoothColorChange = DefaultStyle.KillsTextSmoothColorChange;
default.bLevelTextSmoothColorChange = DefaultStyle.bLevelTextSmoothColorChange; default.bLevelTextSmoothColorChange = DefaultStyle.LevelTextSmoothColorChange;
default.bPingTextSmoothColorChange = DefaultStyle.bPingTextSmoothColorChange; default.bPingTextSmoothColorChange = DefaultStyle.PingTextSmoothColorChange;
default.bShowPingBars = DefaultStyle.bShowPingBars; default.bShowPingBars = DefaultStyle.ShowPingBars;
default.DoshTextColorHigh = DefaultStyle.DoshTextColorHigh; default.DoshTextColorHigh = DefaultStyle.DoshTextColorHigh;
default.DoshTextColorLow = DefaultStyle.DoshTextColorLow; default.DoshTextColorLow = DefaultStyle.DoshTextColorLow;
default.DoshTextColorMid = DefaultStyle.DoshTextColorMid; default.DoshTextColorMid = DefaultStyle.DoshTextColorMid;
@ -182,9 +187,9 @@ public static function InitConfig(int ConfigVersion)
default.StateBoxColorArmorLow = DefaultStyle.StateBoxColorArmorLow; default.StateBoxColorArmorLow = DefaultStyle.StateBoxColorArmorLow;
default.StateBoxColorArmorMid = DefaultStyle.StateBoxColorArmorMid; default.StateBoxColorArmorMid = DefaultStyle.StateBoxColorArmorMid;
default.StateBoxColorDead = DefaultStyle.StateBoxColorDead; default.StateBoxColorDead = DefaultStyle.StateBoxColorDead;
default.StateBoxColorHPHigh = DefaultStyle.StateBoxColorHPHigh; default.StateBoxColorHealthHigh = DefaultStyle.StateBoxColorHealthHigh;
default.StateBoxColorHPLow = DefaultStyle.StateBoxColorHPLow; default.StateBoxColorHealthLow = DefaultStyle.StateBoxColorHealthLow;
default.StateBoxColorHPMid = DefaultStyle.StateBoxColorHPMid; default.StateBoxColorHealthMid = DefaultStyle.StateBoxColorHealthMid;
default.StateBoxColorLobby = DefaultStyle.StateBoxColorLobby; default.StateBoxColorLobby = DefaultStyle.StateBoxColorLobby;
default.StateBoxColorNotReady = DefaultStyle.StateBoxColorNotReady; default.StateBoxColorNotReady = DefaultStyle.StateBoxColorNotReady;
default.StateBoxColorReady = DefaultStyle.StateBoxColorReady; default.StateBoxColorReady = DefaultStyle.StateBoxColorReady;
@ -192,10 +197,18 @@ public static function InitConfig(int ConfigVersion)
default.StateTextColorArmorHigh = DefaultStyle.StateTextColorArmorHigh; default.StateTextColorArmorHigh = DefaultStyle.StateTextColorArmorHigh;
default.StateTextColorArmorLow = DefaultStyle.StateTextColorArmorLow; default.StateTextColorArmorLow = DefaultStyle.StateTextColorArmorLow;
default.StateTextColorArmorMid = DefaultStyle.StateTextColorArmorMid; default.StateTextColorArmorMid = DefaultStyle.StateTextColorArmorMid;
default.StateTextColorHPHigh = DefaultStyle.StateTextColorHPHigh; default.StateTextColorHealthUnknown = DefaultStyle.StateTextColorHealthUnknown;
default.StateTextColorHPLow = DefaultStyle.StateTextColorHPLow; default.StateTextColorHealthHigh = DefaultStyle.StateTextColorHealthHigh;
default.StateTextColorHPMid = DefaultStyle.StateTextColorHPMid; default.StateTextColorHealthLow = DefaultStyle.StateTextColorHealthLow;
default.StateTextColorHealthMid = DefaultStyle.StateTextColorHealthMid;
default.StatsOwnerBoxColor = DefaultStyle.StatsOwnerBoxColor; default.StatsOwnerBoxColor = DefaultStyle.StatsOwnerBoxColor;
default.ShapeStateHealthBoxTopPlayer = DefaultStyle.ShapeStateHealthBoxTopPlayer;
default.ShapeStateHealthBoxMidPlayer = DefaultStyle.ShapeStateHealthBoxMidPlayer;
default.ShapeStateHealthBoxBottomPlayer = DefaultStyle.ShapeStateHealthBoxBottomPlayer;
default.ShapeStateArmorBoxTopPlayer = DefaultStyle.ShapeStateArmorBoxTopPlayer;
default.ShapeStateArmorBoxMidPlayer = DefaultStyle.ShapeStateArmorBoxMidPlayer;
default.ShapeStateArmorBoxBottomPlayer = DefaultStyle.ShapeStateArmorBoxBottomPlayer;
default.PingTextColorNone = DefaultStyle.PingTextColorNone;
WriteSettings(Settings()); WriteSettings(Settings());
@ -226,9 +239,12 @@ public static function YASStyle Settings()
Settings.ShapeWaveInfoBox = default.ShapeWaveInfoBox; Settings.ShapeWaveInfoBox = default.ShapeWaveInfoBox;
Settings.ShapePlayersCountBox = default.ShapePlayersCountBox; Settings.ShapePlayersCountBox = default.ShapePlayersCountBox;
Settings.ShapeHeaderBox = default.ShapeHeaderBox; Settings.ShapeHeaderBox = default.ShapeHeaderBox;
Settings.ShapeLeftStateBoxTopPlayer = default.ShapeLeftStateBoxTopPlayer; Settings.ShapeStateHealthBoxTopPlayer = default.ShapeStateHealthBoxTopPlayer;
Settings.ShapeLeftStateBoxMidPlayer = default.ShapeLeftStateBoxMidPlayer; Settings.ShapeStateHealthBoxMidPlayer = default.ShapeStateHealthBoxMidPlayer;
Settings.ShapeLeftStateBoxBottomPlayer = default.ShapeLeftStateBoxBottomPlayer; Settings.ShapeStateHealthBoxBottomPlayer = default.ShapeStateHealthBoxBottomPlayer;
Settings.ShapeStateArmorBoxTopPlayer = default.ShapeStateArmorBoxTopPlayer;
Settings.ShapeStateArmorBoxMidPlayer = default.ShapeStateArmorBoxMidPlayer;
Settings.ShapeStateArmorBoxBottomPlayer = default.ShapeStateArmorBoxBottomPlayer;
Settings.ShapePlayerBoxTopPlayer = default.ShapePlayerBoxTopPlayer; Settings.ShapePlayerBoxTopPlayer = default.ShapePlayerBoxTopPlayer;
Settings.ShapePlayerBoxMidPlayer = default.ShapePlayerBoxMidPlayer; Settings.ShapePlayerBoxMidPlayer = default.ShapePlayerBoxMidPlayer;
Settings.ShapePlayerBoxBottomPlayer = default.ShapePlayerBoxBottomPlayer; Settings.ShapePlayerBoxBottomPlayer = default.ShapePlayerBoxBottomPlayer;
@ -262,9 +278,9 @@ public static function YASStyle Settings()
Settings.StateBoxColorNotReady = default.StateBoxColorNotReady; Settings.StateBoxColorNotReady = default.StateBoxColorNotReady;
Settings.StateBoxColorSpectator = default.StateBoxColorSpectator; Settings.StateBoxColorSpectator = default.StateBoxColorSpectator;
Settings.StateBoxColorDead = default.StateBoxColorDead; Settings.StateBoxColorDead = default.StateBoxColorDead;
Settings.StateBoxColorHPLow = default.StateBoxColorHPLow; Settings.StateBoxColorHealthLow = default.StateBoxColorHealthLow;
Settings.StateBoxColorHPMid = default.StateBoxColorHPMid; Settings.StateBoxColorHealthMid = default.StateBoxColorHealthMid;
Settings.StateBoxColorHPHigh = default.StateBoxColorHPHigh; Settings.StateBoxColorHealthHigh = default.StateBoxColorHealthHigh;
Settings.StateBoxColorArmorLow = default.StateBoxColorArmorLow; Settings.StateBoxColorArmorLow = default.StateBoxColorArmorLow;
Settings.StateBoxColorArmorMid = default.StateBoxColorArmorMid; Settings.StateBoxColorArmorMid = default.StateBoxColorArmorMid;
Settings.StateBoxColorArmorHigh = default.StateBoxColorArmorHigh; Settings.StateBoxColorArmorHigh = default.StateBoxColorArmorHigh;
@ -283,9 +299,10 @@ public static function YASStyle Settings()
Settings.StateTextColorNotReady = default.StateTextColorNotReady; Settings.StateTextColorNotReady = default.StateTextColorNotReady;
Settings.StateTextColorSpectator = default.StateTextColorSpectator; Settings.StateTextColorSpectator = default.StateTextColorSpectator;
Settings.StateTextColorDead = default.StateTextColorDead; Settings.StateTextColorDead = default.StateTextColorDead;
Settings.StateTextColorHPLow = default.StateTextColorHPLow; Settings.StateTextColorHealthUnknown = default.StateTextColorHealthUnknown;
Settings.StateTextColorHPMid = default.StateTextColorHPMid; Settings.StateTextColorHealthLow = default.StateTextColorHealthLow;
Settings.StateTextColorHPHigh = default.StateTextColorHPHigh; Settings.StateTextColorHealthMid = default.StateTextColorHealthMid;
Settings.StateTextColorHealthHigh = default.StateTextColorHealthHigh;
Settings.StateTextColorArmorLow = default.StateTextColorArmorLow; Settings.StateTextColorArmorLow = default.StateTextColorArmorLow;
Settings.StateTextColorArmorMid = default.StateTextColorArmorMid; Settings.StateTextColorArmorMid = default.StateTextColorArmorMid;
Settings.StateTextColorArmorHigh = default.StateTextColorArmorHigh; Settings.StateTextColorArmorHigh = default.StateTextColorArmorHigh;
@ -331,21 +348,22 @@ public static function YASStyle Settings()
Settings.AssistsTextColorHigh = default.AssistsTextColorHigh; Settings.AssistsTextColorHigh = default.AssistsTextColorHigh;
// Ping text // Ping text
Settings.PingTextColorNone = default.PingTextColorNone;
Settings.PingTextColorLow = default.PingTextColorLow; Settings.PingTextColorLow = default.PingTextColorLow;
Settings.PingTextColorMid = default.PingTextColorMid; Settings.PingTextColorMid = default.PingTextColorMid;
Settings.PingTextColorHigh = default.PingTextColorHigh; Settings.PingTextColorHigh = default.PingTextColorHigh;
// Other settings // Other settings
Settings.bShowPingBars = default.bShowPingBars; Settings.ShowPingBars = default.bShowPingBars;
Settings.bHealthBoxSmoothColorChange = default.bHealthBoxSmoothColorChange; Settings.HealthBoxSmoothColorChange = default.bHealthBoxSmoothColorChange;
Settings.bArmorBoxSmoothColorChange = default.bArmorBoxSmoothColorChange; Settings.ArmorBoxSmoothColorChange = default.bArmorBoxSmoothColorChange;
Settings.bHealthTextSmoothColorChange = default.bHealthTextSmoothColorChange; Settings.HealthTextSmoothColorChange = default.bHealthTextSmoothColorChange;
Settings.bArmorTextSmoothColorChange = default.bArmorTextSmoothColorChange; Settings.ArmorTextSmoothColorChange = default.bArmorTextSmoothColorChange;
Settings.bLevelTextSmoothColorChange = default.bLevelTextSmoothColorChange; Settings.LevelTextSmoothColorChange = default.bLevelTextSmoothColorChange;
Settings.bDoshTextSmoothColorChange = default.bDoshTextSmoothColorChange; Settings.DoshTextSmoothColorChange = default.bDoshTextSmoothColorChange;
Settings.bKillsTextSmoothColorChange = default.bKillsTextSmoothColorChange; Settings.KillsTextSmoothColorChange = default.bKillsTextSmoothColorChange;
Settings.bAssistsTextSmoothColorChange = default.bAssistsTextSmoothColorChange; Settings.AssistsTextSmoothColorChange = default.bAssistsTextSmoothColorChange;
Settings.bPingTextSmoothColorChange = default.bPingTextSmoothColorChange; Settings.PingTextSmoothColorChange = default.bPingTextSmoothColorChange;
return Settings; return Settings;
} }
@ -361,9 +379,12 @@ public static function WriteSettings(YASStyle Settings)
default.ShapeWaveInfoBox = Settings.ShapeWaveInfoBox; default.ShapeWaveInfoBox = Settings.ShapeWaveInfoBox;
default.ShapePlayersCountBox = Settings.ShapePlayersCountBox; default.ShapePlayersCountBox = Settings.ShapePlayersCountBox;
default.ShapeHeaderBox = Settings.ShapeHeaderBox; default.ShapeHeaderBox = Settings.ShapeHeaderBox;
default.ShapeLeftStateBoxTopPlayer = Settings.ShapeLeftStateBoxTopPlayer; default.ShapeStateHealthBoxTopPlayer = Settings.ShapeStateHealthBoxTopPlayer;
default.ShapeLeftStateBoxMidPlayer = Settings.ShapeLeftStateBoxMidPlayer; default.ShapeStateHealthBoxMidPlayer = Settings.ShapeStateHealthBoxMidPlayer;
default.ShapeLeftStateBoxBottomPlayer = Settings.ShapeLeftStateBoxBottomPlayer; default.ShapeStateHealthBoxBottomPlayer = Settings.ShapeStateHealthBoxBottomPlayer;
default.ShapeStateArmorBoxTopPlayer = Settings.ShapeStateArmorBoxTopPlayer;
default.ShapeStateArmorBoxMidPlayer = Settings.ShapeStateArmorBoxMidPlayer;
default.ShapeStateArmorBoxBottomPlayer = Settings.ShapeStateArmorBoxBottomPlayer;
default.ShapePlayerBoxTopPlayer = Settings.ShapePlayerBoxTopPlayer; default.ShapePlayerBoxTopPlayer = Settings.ShapePlayerBoxTopPlayer;
default.ShapePlayerBoxMidPlayer = Settings.ShapePlayerBoxMidPlayer; default.ShapePlayerBoxMidPlayer = Settings.ShapePlayerBoxMidPlayer;
default.ShapePlayerBoxBottomPlayer = Settings.ShapePlayerBoxBottomPlayer; default.ShapePlayerBoxBottomPlayer = Settings.ShapePlayerBoxBottomPlayer;
@ -397,9 +418,9 @@ public static function WriteSettings(YASStyle Settings)
default.StateBoxColorNotReady = Settings.StateBoxColorNotReady; default.StateBoxColorNotReady = Settings.StateBoxColorNotReady;
default.StateBoxColorSpectator = Settings.StateBoxColorSpectator; default.StateBoxColorSpectator = Settings.StateBoxColorSpectator;
default.StateBoxColorDead = Settings.StateBoxColorDead; default.StateBoxColorDead = Settings.StateBoxColorDead;
default.StateBoxColorHPLow = Settings.StateBoxColorHPLow; default.StateBoxColorHealthLow = Settings.StateBoxColorHealthLow;
default.StateBoxColorHPMid = Settings.StateBoxColorHPMid; default.StateBoxColorHealthMid = Settings.StateBoxColorHealthMid;
default.StateBoxColorHPHigh = Settings.StateBoxColorHPHigh; default.StateBoxColorHealthHigh = Settings.StateBoxColorHealthHigh;
default.StateBoxColorArmorLow = Settings.StateBoxColorArmorLow; default.StateBoxColorArmorLow = Settings.StateBoxColorArmorLow;
default.StateBoxColorArmorMid = Settings.StateBoxColorArmorMid; default.StateBoxColorArmorMid = Settings.StateBoxColorArmorMid;
default.StateBoxColorArmorHigh = Settings.StateBoxColorArmorHigh; default.StateBoxColorArmorHigh = Settings.StateBoxColorArmorHigh;
@ -418,9 +439,10 @@ public static function WriteSettings(YASStyle Settings)
default.StateTextColorNotReady = Settings.StateTextColorNotReady; default.StateTextColorNotReady = Settings.StateTextColorNotReady;
default.StateTextColorSpectator = Settings.StateTextColorSpectator; default.StateTextColorSpectator = Settings.StateTextColorSpectator;
default.StateTextColorDead = Settings.StateTextColorDead; default.StateTextColorDead = Settings.StateTextColorDead;
default.StateTextColorHPLow = Settings.StateTextColorHPLow; default.StateTextColorHealthUnknown = Settings.StateTextColorHealthUnknown;
default.StateTextColorHPMid = Settings.StateTextColorHPMid; default.StateTextColorHealthLow = Settings.StateTextColorHealthLow;
default.StateTextColorHPHigh = Settings.StateTextColorHPHigh; default.StateTextColorHealthMid = Settings.StateTextColorHealthMid;
default.StateTextColorHealthHigh = Settings.StateTextColorHealthHigh;
default.StateTextColorArmorLow = Settings.StateTextColorArmorLow; default.StateTextColorArmorLow = Settings.StateTextColorArmorLow;
default.StateTextColorArmorMid = Settings.StateTextColorArmorMid; default.StateTextColorArmorMid = Settings.StateTextColorArmorMid;
default.StateTextColorArmorHigh = Settings.StateTextColorArmorHigh; default.StateTextColorArmorHigh = Settings.StateTextColorArmorHigh;
@ -466,21 +488,22 @@ public static function WriteSettings(YASStyle Settings)
default.AssistsTextColorHigh = Settings.AssistsTextColorHigh; default.AssistsTextColorHigh = Settings.AssistsTextColorHigh;
// Ping text // Ping text
default.PingTextColorNone = Settings.PingTextColorNone;
default.PingTextColorLow = Settings.PingTextColorLow; default.PingTextColorLow = Settings.PingTextColorLow;
default.PingTextColorMid = Settings.PingTextColorMid; default.PingTextColorMid = Settings.PingTextColorMid;
default.PingTextColorHigh = Settings.PingTextColorHigh; default.PingTextColorHigh = Settings.PingTextColorHigh;
// Other settings // Other settings
default.bShowPingBars = Settings.bShowPingBars; default.bShowPingBars = Settings.ShowPingBars;
default.bHealthBoxSmoothColorChange = Settings.bHealthBoxSmoothColorChange; default.bHealthBoxSmoothColorChange = Settings.HealthBoxSmoothColorChange;
default.bArmorBoxSmoothColorChange = Settings.bArmorBoxSmoothColorChange; default.bArmorBoxSmoothColorChange = Settings.ArmorBoxSmoothColorChange;
default.bHealthTextSmoothColorChange = Settings.bHealthTextSmoothColorChange; default.bHealthTextSmoothColorChange = Settings.HealthTextSmoothColorChange;
default.bArmorTextSmoothColorChange = Settings.bArmorTextSmoothColorChange; default.bArmorTextSmoothColorChange = Settings.ArmorTextSmoothColorChange;
default.bLevelTextSmoothColorChange = Settings.bLevelTextSmoothColorChange; default.bLevelTextSmoothColorChange = Settings.LevelTextSmoothColorChange;
default.bDoshTextSmoothColorChange = Settings.bDoshTextSmoothColorChange; default.bDoshTextSmoothColorChange = Settings.DoshTextSmoothColorChange;
default.bKillsTextSmoothColorChange = Settings.bKillsTextSmoothColorChange; default.bKillsTextSmoothColorChange = Settings.KillsTextSmoothColorChange;
default.bAssistsTextSmoothColorChange = Settings.bAssistsTextSmoothColorChange; default.bAssistsTextSmoothColorChange = Settings.AssistsTextSmoothColorChange;
default.bPingTextSmoothColorChange = Settings.bPingTextSmoothColorChange; default.bPingTextSmoothColorChange = Settings.PingTextSmoothColorChange;
} }
defaultProperties defaultProperties

View File

@ -16,9 +16,10 @@ public static function InitConfig(int ConfigVersion)
switch (ConfigVersion) switch (ConfigVersion)
{ {
case 0: case 0:
case 1:
WriteSettings(DefaultSettings()); WriteSettings(DefaultSettings());
case 1:
case 2147483647: case 2147483647:
StaticSaveConfig(); StaticSaveConfig();
} }

View File

@ -16,9 +16,10 @@ public static function InitConfig(int ConfigVersion)
switch (ConfigVersion) switch (ConfigVersion)
{ {
case 0: case 0:
case 1:
WriteSettings(DefaultSettings()); WriteSettings(DefaultSettings());
case 1:
case 2147483647: case 2147483647:
StaticSaveConfig(); StaticSaveConfig();
} }

View File

@ -26,6 +26,7 @@ struct Fields
var bool Kills; var bool Kills;
var bool Assists; var bool Assists;
var bool Health; var bool Health;
var bool Armor;
var bool Ping; var bool Ping;
StructDefaultProperties StructDefaultProperties
@ -38,6 +39,7 @@ struct Fields
Kills = false; Kills = false;
Assists = false; Assists = false;
Health = false; Health = false;
Armor = false;
Ping = false; Ping = false;
} }
}; };
@ -83,7 +85,7 @@ struct YASSettingsAdmin
{ {
Rank = "Admin" Rank = "Admin"
TextColor = (R=250, G=0, B=0, A=255) TextColor = (R=250, G=0, B=0, A=255)
ApplyColorToFields = (Rank=True, Player=True, Level=False, Perk=False, Dosh=False, Kills=False, Assists=False, Health=False, Ping=False) ApplyColorToFields = (Rank=True, Player=True, Level=False, Perk=False, Dosh=False, Kills=False, Assists=False, Health=False, Armor=False, Ping=False)
} }
}; };
@ -97,7 +99,7 @@ struct YASSettingsPlayer
{ {
Rank = "Player" Rank = "Player"
TextColor = (R=250, G=250, B=250, A=255) TextColor = (R=250, G=250, B=250, A=255)
ApplyColorToFields = (Rank=True, Player=True, Level=False, Perk=False, Dosh=False, Kills=False, Assists=False, Health=False, Ping=False) ApplyColorToFields = (Rank=True, Player=True, Level=False, Perk=False, Dosh=False, Kills=False, Assists=False, Health=False, Armor=False, Ping=False)
} }
}; };
@ -144,7 +146,6 @@ struct YASSettingsLevel
StructDefaultProperties StructDefaultProperties
{ {
Dynamic = True
Low [0] = 0 Low [0] = 0
High[0] = 0 High[0] = 0
Low [1] = 5 Low [1] = 5
@ -165,9 +166,12 @@ struct YASStyle
var int ShapeWaveInfoBox; var int ShapeWaveInfoBox;
var int ShapePlayersCountBox; var int ShapePlayersCountBox;
var int ShapeHeaderBox; var int ShapeHeaderBox;
var int ShapeLeftStateBoxTopPlayer; var int ShapeStateHealthBoxTopPlayer;
var int ShapeLeftStateBoxMidPlayer; var int ShapeStateHealthBoxMidPlayer;
var int ShapeLeftStateBoxBottomPlayer; var int ShapeStateHealthBoxBottomPlayer;
var int ShapeStateArmorBoxTopPlayer;
var int ShapeStateArmorBoxMidPlayer;
var int ShapeStateArmorBoxBottomPlayer;
var int ShapePlayerBoxTopPlayer; var int ShapePlayerBoxTopPlayer;
var int ShapePlayerBoxMidPlayer; var int ShapePlayerBoxMidPlayer;
var int ShapePlayerBoxBottomPlayer; var int ShapePlayerBoxBottomPlayer;
@ -201,9 +205,9 @@ struct YASStyle
var ColorRGBA StateBoxColorNotReady; var ColorRGBA StateBoxColorNotReady;
var ColorRGBA StateBoxColorSpectator; var ColorRGBA StateBoxColorSpectator;
var ColorRGBA StateBoxColorDead; var ColorRGBA StateBoxColorDead;
var ColorRGBA StateBoxColorHPLow; var ColorRGBA StateBoxColorHealthLow;
var ColorRGBA StateBoxColorHPMid; var ColorRGBA StateBoxColorHealthMid;
var ColorRGBA StateBoxColorHPHigh; var ColorRGBA StateBoxColorHealthHigh;
var ColorRGBA StateBoxColorArmorLow; var ColorRGBA StateBoxColorArmorLow;
var ColorRGBA StateBoxColorArmorMid; var ColorRGBA StateBoxColorArmorMid;
var ColorRGBA StateBoxColorArmorHigh; var ColorRGBA StateBoxColorArmorHigh;
@ -222,9 +226,10 @@ struct YASStyle
var ColorRGBA StateTextColorNotReady; var ColorRGBA StateTextColorNotReady;
var ColorRGBA StateTextColorSpectator; var ColorRGBA StateTextColorSpectator;
var ColorRGBA StateTextColorDead; var ColorRGBA StateTextColorDead;
var ColorRGBA StateTextColorHPLow; var ColorRGBA StateTextColorHealthUnknown;
var ColorRGBA StateTextColorHPMid; var ColorRGBA StateTextColorHealthLow;
var ColorRGBA StateTextColorHPHigh; var ColorRGBA StateTextColorHealthMid;
var ColorRGBA StateTextColorHealthHigh;
var ColorRGBA StateTextColorArmorLow; var ColorRGBA StateTextColorArmorLow;
var ColorRGBA StateTextColorArmorMid; var ColorRGBA StateTextColorArmorMid;
var ColorRGBA StateTextColorArmorHigh; var ColorRGBA StateTextColorArmorHigh;
@ -270,21 +275,22 @@ struct YASStyle
var ColorRGBA AssistsTextColorHigh; var ColorRGBA AssistsTextColorHigh;
// Ping text // Ping text
var ColorRGBA PingTextColorNone;
var ColorRGBA PingTextColorLow; var ColorRGBA PingTextColorLow;
var ColorRGBA PingTextColorMid; var ColorRGBA PingTextColorMid;
var ColorRGBA PingTextColorHigh; var ColorRGBA PingTextColorHigh;
// Other settings // Other settings
var bool bShowPingBars; var bool ShowPingBars;
var bool bHealthBoxSmoothColorChange; var bool HealthBoxSmoothColorChange;
var bool bArmorBoxSmoothColorChange; var bool ArmorBoxSmoothColorChange;
var bool bHealthTextSmoothColorChange; var bool HealthTextSmoothColorChange;
var bool bArmorTextSmoothColorChange; var bool ArmorTextSmoothColorChange;
var bool bLevelTextSmoothColorChange; var bool LevelTextSmoothColorChange;
var bool bDoshTextSmoothColorChange; var bool DoshTextSmoothColorChange;
var bool bKillsTextSmoothColorChange; var bool KillsTextSmoothColorChange;
var bool bAssistsTextSmoothColorChange; var bool AssistsTextSmoothColorChange;
var bool bPingTextSmoothColorChange; var bool PingTextSmoothColorChange;
StructDefaultProperties StructDefaultProperties
{ {
@ -296,9 +302,12 @@ struct YASStyle
ShapeWaveInfoBox = 0 ShapeWaveInfoBox = 0
ShapePlayersCountBox = 152 ShapePlayersCountBox = 152
ShapeHeaderBox = 150 ShapeHeaderBox = 150
ShapeLeftStateBoxTopPlayer = 151 ShapeStateHealthBoxTopPlayer = 151
ShapeLeftStateBoxMidPlayer = 151 ShapeStateHealthBoxMidPlayer = 151
ShapeLeftStateBoxBottomPlayer = 151 ShapeStateHealthBoxBottomPlayer = 151
ShapeStateArmorBoxTopPlayer = 151
ShapeStateArmorBoxMidPlayer = 151
ShapeStateArmorBoxBottomPlayer = 151
ShapePlayerBoxTopPlayer = 0 ShapePlayerBoxTopPlayer = 0
ShapePlayerBoxMidPlayer = 0 ShapePlayerBoxMidPlayer = 0
ShapePlayerBoxBottomPlayer = 0 ShapePlayerBoxBottomPlayer = 0
@ -332,9 +341,10 @@ struct YASStyle
StateBoxColorNotReady = (R=150, G=150, B=150, A=150) StateBoxColorNotReady = (R=150, G=150, B=150, A=150)
StateBoxColorSpectator = (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) StateBoxColorDead = (R=200, G=0, B=0, A=150)
StateBoxColorHPLow = (R=200, G=50, B=50, A=150) StateTextColorHealthUnknown = (R=150, G=150, B=150, A=150)
StateBoxColorHPMid = (R=200, G=200, B=0, A=150) StateBoxColorHealthLow = (R=200, G=50, B=50, A=150)
StateBoxColorHPHigh = (R=0, G=200, B=0, A=150) StateBoxColorHealthMid = (R=200, G=200, B=0, A=150)
StateBoxColorHealthHigh = (R=0, G=200, B=0, A=150)
StateBoxColorArmorLow = (R=0, G=0, B=150, A=150) StateBoxColorArmorLow = (R=0, G=0, B=150, A=150)
StateBoxColorArmorMid = (R=0, G=0, B=150, A=150) StateBoxColorArmorMid = (R=0, G=0, B=150, A=150)
StateBoxColorArmorHigh = (R=0, G=0, B=150, A=150) StateBoxColorArmorHigh = (R=0, G=0, B=150, A=150)
@ -353,9 +363,9 @@ struct YASStyle
StateTextColorNotReady = (R=150, G=150, B=150, A=150) StateTextColorNotReady = (R=150, G=150, B=150, A=150)
StateTextColorSpectator = (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) StateTextColorDead = (R=250, G=0, B=0, A=255)
StateTextColorLowHP = (R=250, G=250, B=250, A=255) StateTextColorHealthLow = (R=250, G=250, B=250, A=255)
StateTextColorMidHP = (R=250, G=250, B=250, A=255) StateTextColorHealthMid = (R=250, G=250, B=250, A=255)
StateTextColorHighHP = (R=250, G=250, B=250, A=255) StateTextColorHealthHigh = (R=250, G=250, B=250, A=255)
StateTextColorArmorLow = (R=250, G=250, B=250, A=255) StateTextColorArmorLow = (R=250, G=250, B=250, A=255)
StateTextColorArmorMid = (R=250, G=250, B=250, A=255) StateTextColorArmorMid = (R=250, G=250, B=250, A=255)
StateTextColorArmorHigh = (R=250, G=250, B=250, A=255) StateTextColorArmorHigh = (R=250, G=250, B=250, A=255)
@ -407,16 +417,16 @@ struct YASStyle
PingTextColorHigh = (R=250, G=0, B=0, A=255) PingTextColorHigh = (R=250, G=0, B=0, A=255)
// Other settings // Other settings
bShowPingBars = true ShowPingBars = true
bHealthBoxSmoothColorChange = true HealthBoxSmoothColorChange = true
bArmorBoxSmoothColorChange = true ArmorBoxSmoothColorChange = true
bHealthTextSmoothColorChange = false HealthTextSmoothColorChange = false
bArmorTextSmoothColorChange = false ArmorTextSmoothColorChange = false
bLevelTextSmoothColorChange = false LevelTextSmoothColorChange = false
bDoshTextSmoothColorChange = false DoshTextSmoothColorChange = false
bKillsTextSmoothColorChange = false KillsTextSmoothColorChange = false
bAssistsTextSmoothColorChange = false AssistsTextSmoothColorChange = false
bPingTextSmoothColorChange = false PingTextSmoothColorChange = false
} }
}; };