wip
This commit is contained in:
parent
446d327df7
commit
847af69506
@ -453,6 +453,8 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
local float BorderSize;
|
local float BorderSize;
|
||||||
local int Armor, MaxArmor;
|
local int Armor, MaxArmor;
|
||||||
|
|
||||||
|
local ColorRGBA HealthBoxColor, ArmorBoxColor, HealthTextColor, ArmorTextColor;
|
||||||
|
|
||||||
BorderSize = Owner.HUDOwner.ScaledBorderSize;
|
BorderSize = Owner.HUDOwner.ScaledBorderSize;
|
||||||
|
|
||||||
YOffset *= 1.05;
|
YOffset *= 1.05;
|
||||||
@ -509,49 +511,67 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
else
|
else
|
||||||
Shape = Settings.Style.ShapeStateHealthBoxMidPlayer;
|
Shape = Settings.Style.ShapeStateHealthBoxMidPlayer;
|
||||||
|
|
||||||
// Health
|
|
||||||
Owner.CurrentStyle.DrawRectBox(XPos,
|
|
||||||
YOffset,
|
|
||||||
HealthWBox,
|
|
||||||
Height,
|
|
||||||
Settings.Style.EdgeSize,
|
|
||||||
Shape);
|
|
||||||
|
|
||||||
if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun)
|
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;;
|
S = class'KFGFxMenu_ServerBrowser'.default.InLobbyString;;
|
||||||
}
|
}
|
||||||
else if (!KFGRI.bMatchHasBegun)
|
else if (!KFGRI.bMatchHasBegun)
|
||||||
{
|
{
|
||||||
if (KFPRI.bReadyToPlay)
|
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;
|
S = Ready;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorNotReady);
|
HealthBoxColor = Settings.Style.StateBoxColorNotReady;
|
||||||
|
ArmorBoxColor = Settings.Style.StateBoxColorNotReady;
|
||||||
|
HealthTextColor = Settings.Style.StateBoxColorNotReady;
|
||||||
|
ArmorTextColor = Settings.Style.StateBoxColorNotReady;
|
||||||
S = NotReady;
|
S = NotReady;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None)
|
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;
|
S = Unknown;
|
||||||
}
|
}
|
||||||
else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0)
|
else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0)
|
||||||
{
|
{
|
||||||
if (KFPRI.bOnlySpectator)
|
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;
|
S = class'KFCommon_LocalizedStrings'.default.SpectatorString;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorDead);
|
HealthBoxColor = Settings.Style.StateTextColorDead;
|
||||||
|
ArmorBoxColor = Settings.Style.StateTextColorDead;
|
||||||
|
HealthTextColor = Settings.Style.StateTextColorDead;
|
||||||
|
ArmorTextColor = Settings.Style.StateTextColorDead;
|
||||||
S = Dead;
|
S = Dead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Health
|
||||||
|
Owner.CurrentStyle.DrawRectBox(XPos,
|
||||||
|
YOffset,
|
||||||
|
HealthWBox,
|
||||||
|
Height,
|
||||||
|
Settings.Style.EdgeSize,
|
||||||
|
Shape);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -51,6 +51,7 @@ 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 StateBoxColorNone;
|
||||||
var config ColorRGBA StateBoxColorHealthLow;
|
var config ColorRGBA StateBoxColorHealthLow;
|
||||||
var config ColorRGBA StateBoxColorHealthMid;
|
var config ColorRGBA StateBoxColorHealthMid;
|
||||||
var config ColorRGBA StateBoxColorHealthHigh;
|
var config ColorRGBA StateBoxColorHealthHigh;
|
||||||
@ -72,7 +73,7 @@ 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 StateTextColorHealthUnknown;
|
var config ColorRGBA StateTextColorNone;
|
||||||
var config ColorRGBA StateTextColorHealthLow;
|
var config ColorRGBA StateTextColorHealthLow;
|
||||||
var config ColorRGBA StateTextColorHealthMid;
|
var config ColorRGBA StateTextColorHealthMid;
|
||||||
var config ColorRGBA StateTextColorHealthHigh;
|
var config ColorRGBA StateTextColorHealthHigh;
|
||||||
@ -187,6 +188,7 @@ 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.StateBoxColorNone = DefaultStyle.StateBoxColorNone;
|
||||||
default.StateBoxColorHealthHigh = DefaultStyle.StateBoxColorHealthHigh;
|
default.StateBoxColorHealthHigh = DefaultStyle.StateBoxColorHealthHigh;
|
||||||
default.StateBoxColorHealthLow = DefaultStyle.StateBoxColorHealthLow;
|
default.StateBoxColorHealthLow = DefaultStyle.StateBoxColorHealthLow;
|
||||||
default.StateBoxColorHealthMid = DefaultStyle.StateBoxColorHealthMid;
|
default.StateBoxColorHealthMid = DefaultStyle.StateBoxColorHealthMid;
|
||||||
@ -197,7 +199,7 @@ 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.StateTextColorHealthUnknown = DefaultStyle.StateTextColorHealthUnknown;
|
default.StateTextColorNone = DefaultStyle.StateTextColorNone;
|
||||||
default.StateTextColorHealthHigh = DefaultStyle.StateTextColorHealthHigh;
|
default.StateTextColorHealthHigh = DefaultStyle.StateTextColorHealthHigh;
|
||||||
default.StateTextColorHealthLow = DefaultStyle.StateTextColorHealthLow;
|
default.StateTextColorHealthLow = DefaultStyle.StateTextColorHealthLow;
|
||||||
default.StateTextColorHealthMid = DefaultStyle.StateTextColorHealthMid;
|
default.StateTextColorHealthMid = DefaultStyle.StateTextColorHealthMid;
|
||||||
@ -278,6 +280,7 @@ 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.StateBoxColorNone = default.StateBoxColorNone;
|
||||||
Settings.StateBoxColorHealthLow = default.StateBoxColorHealthLow;
|
Settings.StateBoxColorHealthLow = default.StateBoxColorHealthLow;
|
||||||
Settings.StateBoxColorHealthMid = default.StateBoxColorHealthMid;
|
Settings.StateBoxColorHealthMid = default.StateBoxColorHealthMid;
|
||||||
Settings.StateBoxColorHealthHigh = default.StateBoxColorHealthHigh;
|
Settings.StateBoxColorHealthHigh = default.StateBoxColorHealthHigh;
|
||||||
@ -299,7 +302,7 @@ 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.StateTextColorHealthUnknown = default.StateTextColorHealthUnknown;
|
Settings.StateTextColorNone = default.StateTextColorNone;
|
||||||
Settings.StateTextColorHealthLow = default.StateTextColorHealthLow;
|
Settings.StateTextColorHealthLow = default.StateTextColorHealthLow;
|
||||||
Settings.StateTextColorHealthMid = default.StateTextColorHealthMid;
|
Settings.StateTextColorHealthMid = default.StateTextColorHealthMid;
|
||||||
Settings.StateTextColorHealthHigh = default.StateTextColorHealthHigh;
|
Settings.StateTextColorHealthHigh = default.StateTextColorHealthHigh;
|
||||||
@ -354,16 +357,16 @@ public static function YASStyle Settings()
|
|||||||
Settings.PingTextColorHigh = default.PingTextColorHigh;
|
Settings.PingTextColorHigh = default.PingTextColorHigh;
|
||||||
|
|
||||||
// Other settings
|
// Other settings
|
||||||
Settings.ShowPingBars = default.bShowPingBars;
|
Settings.ShowPingBars = default.bShowPingBars;
|
||||||
Settings.HealthBoxSmoothColorChange = default.bHealthBoxSmoothColorChange;
|
Settings.HealthBoxSmoothColorChange = default.bHealthBoxSmoothColorChange;
|
||||||
Settings.ArmorBoxSmoothColorChange = default.bArmorBoxSmoothColorChange;
|
Settings.ArmorBoxSmoothColorChange = default.bArmorBoxSmoothColorChange;
|
||||||
Settings.HealthTextSmoothColorChange = default.bHealthTextSmoothColorChange;
|
Settings.HealthTextSmoothColorChange = default.bHealthTextSmoothColorChange;
|
||||||
Settings.ArmorTextSmoothColorChange = default.bArmorTextSmoothColorChange;
|
Settings.ArmorTextSmoothColorChange = default.bArmorTextSmoothColorChange;
|
||||||
Settings.LevelTextSmoothColorChange = default.bLevelTextSmoothColorChange;
|
Settings.LevelTextSmoothColorChange = default.bLevelTextSmoothColorChange;
|
||||||
Settings.DoshTextSmoothColorChange = default.bDoshTextSmoothColorChange;
|
Settings.DoshTextSmoothColorChange = default.bDoshTextSmoothColorChange;
|
||||||
Settings.KillsTextSmoothColorChange = default.bKillsTextSmoothColorChange;
|
Settings.KillsTextSmoothColorChange = default.bKillsTextSmoothColorChange;
|
||||||
Settings.AssistsTextSmoothColorChange = default.bAssistsTextSmoothColorChange;
|
Settings.AssistsTextSmoothColorChange = default.bAssistsTextSmoothColorChange;
|
||||||
Settings.PingTextSmoothColorChange = default.bPingTextSmoothColorChange;
|
Settings.PingTextSmoothColorChange = default.bPingTextSmoothColorChange;
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
@ -418,6 +421,7 @@ 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.StateBoxColorNone = Settings.StateBoxColorNone;
|
||||||
default.StateBoxColorHealthLow = Settings.StateBoxColorHealthLow;
|
default.StateBoxColorHealthLow = Settings.StateBoxColorHealthLow;
|
||||||
default.StateBoxColorHealthMid = Settings.StateBoxColorHealthMid;
|
default.StateBoxColorHealthMid = Settings.StateBoxColorHealthMid;
|
||||||
default.StateBoxColorHealthHigh = Settings.StateBoxColorHealthHigh;
|
default.StateBoxColorHealthHigh = Settings.StateBoxColorHealthHigh;
|
||||||
@ -439,7 +443,7 @@ 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.StateTextColorHealthUnknown = Settings.StateTextColorHealthUnknown;
|
default.StateTextColorNone = Settings.StateTextColorNone;
|
||||||
default.StateTextColorHealthLow = Settings.StateTextColorHealthLow;
|
default.StateTextColorHealthLow = Settings.StateTextColorHealthLow;
|
||||||
default.StateTextColorHealthMid = Settings.StateTextColorHealthMid;
|
default.StateTextColorHealthMid = Settings.StateTextColorHealthMid;
|
||||||
default.StateTextColorHealthHigh = Settings.StateTextColorHealthHigh;
|
default.StateTextColorHealthHigh = Settings.StateTextColorHealthHigh;
|
||||||
|
@ -205,6 +205,7 @@ struct YASStyle
|
|||||||
var ColorRGBA StateBoxColorNotReady;
|
var ColorRGBA StateBoxColorNotReady;
|
||||||
var ColorRGBA StateBoxColorSpectator;
|
var ColorRGBA StateBoxColorSpectator;
|
||||||
var ColorRGBA StateBoxColorDead;
|
var ColorRGBA StateBoxColorDead;
|
||||||
|
var ColorRGBA StateBoxColorNone;
|
||||||
var ColorRGBA StateBoxColorHealthLow;
|
var ColorRGBA StateBoxColorHealthLow;
|
||||||
var ColorRGBA StateBoxColorHealthMid;
|
var ColorRGBA StateBoxColorHealthMid;
|
||||||
var ColorRGBA StateBoxColorHealthHigh;
|
var ColorRGBA StateBoxColorHealthHigh;
|
||||||
@ -226,7 +227,7 @@ struct YASStyle
|
|||||||
var ColorRGBA StateTextColorNotReady;
|
var ColorRGBA StateTextColorNotReady;
|
||||||
var ColorRGBA StateTextColorSpectator;
|
var ColorRGBA StateTextColorSpectator;
|
||||||
var ColorRGBA StateTextColorDead;
|
var ColorRGBA StateTextColorDead;
|
||||||
var ColorRGBA StateTextColorHealthUnknown;
|
var ColorRGBA StateTextColorNone;
|
||||||
var ColorRGBA StateTextColorHealthLow;
|
var ColorRGBA StateTextColorHealthLow;
|
||||||
var ColorRGBA StateTextColorHealthMid;
|
var ColorRGBA StateTextColorHealthMid;
|
||||||
var ColorRGBA StateTextColorHealthHigh;
|
var ColorRGBA StateTextColorHealthHigh;
|
||||||
@ -341,7 +342,7 @@ 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)
|
||||||
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)
|
StateBoxColorHealthLow = (R=200, G=50, B=50, A=150)
|
||||||
StateBoxColorHealthMid = (R=200, G=200, B=0, A=150)
|
StateBoxColorHealthMid = (R=200, G=200, B=0, A=150)
|
||||||
StateBoxColorHealthHigh = (R=0, 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)
|
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)
|
||||||
|
StateTextColorNone = (R=250, G=250, B=250, A=255)
|
||||||
StateTextColorHealthLow = (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)
|
StateTextColorHealthMid = (R=250, G=250, B=250, A=255)
|
||||||
StateTextColorHealthHigh = (R=250, G=250, B=250, A=255)
|
StateTextColorHealthHigh = (R=250, G=250, B=250, A=255)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user