This commit is contained in:
GenZmeY 2022-09-03 18:46:23 +03:00
parent 9dd37033fc
commit 302741d427
8 changed files with 53 additions and 236 deletions

Binary file not shown.

Binary file not shown.

View File

@ -50,7 +50,7 @@ function DrawMenu()
MouseYHit = Owner.MousePosition.Y - CompPos[1];
n = ScrollBar.CurrentScroll;
ItemHeight = CompPos[3] / ListItemsPerPage;
ItemHeight = GetItemHeight();
Y = 0.f;
for (i=0; i < ListItemsPerPage; ++i)
{
@ -76,6 +76,11 @@ function DrawMenu()
}
}
function float GetItemHeight()
{
return CompPos[3] / ListItemsPerPage;
}
function PreDraw()
{
local int i;

View File

@ -4,6 +4,9 @@ class KFScoreBoard extends KFGUI_Page
`include(Build.uci)
`include(Logger.uci)
const HeaderWidthRatio = 0.35f;
const PlayerListWidthRatio = 0.6f;
var transient float HealthXPos, RankXPos, PlayerXPos, LevelXPos, PerkXPos, DoshXPos, KillsXPos, AssistXPos, PingXPos, ScrollXPos;
var transient float HealthWBox, RankWBox, PlayerWBox, LevelWBox, PerkWBox, DoshWBox, KillsWBox, AssistWBox, PingWBox, ScrollWBox;
var transient float NextScoreboardRefresh;
@ -23,7 +26,6 @@ var float PingBars;
// Cache
var array<String> PerkNames;
var array<String> StateVariants;
// Ranks
var array<RankInfo> CustomRanks;
@ -65,16 +67,6 @@ function InitMenu()
PerkNames.AddItem(class'KFPerk_SWAT'.default.PerkName);
PerkNames.AddItem(class'KFPerk_Survivalist'.default.PerkName);
}
if (StateVariants.Length == 0)
{
StateVariants.AddItem(State);
StateVariants.AddItem(Ready);
StateVariants.AddItem(NotReady);
StateVariants.AddItem(Unknown);
StateVariants.AddItem(Dead);
StateVariants.AddItem("ABCDABCD");
}
}
static function CheckAvatar(KFPlayerReplicationInfo KFPRI, KFPlayerController PC)
@ -227,7 +219,7 @@ function DrawMenu()
// Server Info
XPosCenter = Canvas.ClipX * 0.5;
Width = Canvas.ClipX * 0.4; // Full Box Width
Width = Canvas.ClipX * HeaderWidthRatio; // Full Box Width
XPos = XPosCenter - Width * 0.5;
YPos = YL;
@ -246,7 +238,7 @@ function DrawMenu()
YPos += BoxH;
// Mid Left Rect (Info)
BoxW = Width * 0.7;
BoxW = Width * 0.7; // TODO ?
BoxH = YL * 2 + BorderSize * 2;
SetDrawColor(Canvas, Settings.Style.GameInfoBoxColor);
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Settings.Style.EdgeSize, Settings.Style.ShapeGameInfoBox);
@ -284,19 +276,12 @@ function DrawMenu()
DrawTextShadowHLeftVCenter(S, BoxX + Settings.Style.EdgeSize, YPos, FontScalar);
S = Owner.CurrentStyle.GetTimeString(KFGRI.ElapsedTime);
DrawTextShadowHVCenter(S, XPos + Width * 0.7, YPos, Width * 0.3, FontScalar);
// TODO: ranked / unranked
//if (KFGameInfo(PC.WorldInfo.Game).IsUnrankedGame())
// S = class'KFGFxMenu_ServerBrowser'.default.UnrankedString;
//else
// S = class'KFGFxMenu_ServerBrowser'.default.RankedString;
//DrawTextShadowHVCenter(S, XPos + XL, YPos, Width * 0.7 + XL, FontScalar);
DrawTextShadowHVCenter(S, XPos + Width * 0.7, YPos, Width * 0.3, FontScalar); // TODO: ?
YPos += BoxH;
// Header
Width = Canvas.ClipX * 0.7;
Width = Canvas.ClipX * PlayerListWidthRatio;
XPos = (Canvas.ClipX - Width) * 0.5;
YPos += YL;
BoxH = YL + BorderSize;
@ -314,20 +299,14 @@ function DrawMenu()
// Health
HealthXPos = 0;
BoxW = 0;
foreach StateVariants(S)
{
Canvas.TextSize(S, XL, YL, FontScalar, FontScalar);
if (XL > BoxW) BoxW = XL;
}
HealthWBox = (BoxW < MinBoxW ? MinBoxW : BoxW) * 0.5 + BorderSize * 2;
Canvas.TextSize("0000", BoxW, YL, FontScalar, FontScalar);
HealthWBox = BoxW + BorderSize * 2;
RankXPos = HealthXPos + HealthWBox + Settings.Style.EdgeSize;
PlayerXPos = Width * 0.30; // TODO
PlayerXPos = HealthXPos + HealthWBox + PlayersList.GetItemHeight() + Settings.Style.EdgeSize;
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.PingString$" ", XL, YL, FontScalar, FontScalar);
PingWBox = XL < MinBoxW ? MinBoxW : XL;
if (NumPlayer <= PlayersList.ListItemsPerPage)
if (true || NumPlayer <= PlayersList.ListItemsPerPage) // TODO: implement scrollbar later
ScrollBarWidth = 0;
else
ScrollBarWidth = BorderSize * 8;
@ -361,7 +340,6 @@ function DrawMenu()
// Header texts
SetDrawColor(Canvas, Settings.Style.ListHeaderTextColor);
DrawTextShadowHLeftVCenter(Rank, XPos + RankXPos, YPos, FontScalar);
DrawTextShadowHLeftVCenter(class'KFGFxHUD_ScoreboardWidget'.default.PlayerString, XPos + PlayerXPos, YPos, FontScalar);
DrawTextShadowHLeftVCenter(class'KFGFxMenu_Inventory'.default.PerkFilterString, XPos + PerkXPos, YPos, FontScalar);
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.KillsString, XPos + KillsXPos, YPos, KillsWBox, FontScalar);
@ -448,7 +426,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
local float BorderSize;
local int Shape, ShapeHealth;
local string TextHealth, TextState;
local ColorRGBA HealthBoxColor, HealthTextColor;
@ -518,7 +495,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
{
HealthBoxColor = Settings.Style.StateBoxColorLobby;
HealthTextColor = Settings.Style.StateTextColorLobby;
TextState = class'KFGFxMenu_ServerBrowser'.default.InLobbyString;;
}
else if (!KFGRI.bMatchHasBegun)
{
@ -526,20 +502,17 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
{
HealthBoxColor = Settings.Style.StateBoxColorReady;
HealthTextColor = Settings.Style.StateBoxColorReady;
TextState = Ready;
}
else
{
HealthBoxColor = Settings.Style.StateBoxColorNotReady;
HealthTextColor = Settings.Style.StateBoxColorNotReady;
TextState = NotReady;
}
}
else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None)
{
HealthBoxColor = Settings.Style.StateTextColorNone;
HealthTextColor = Settings.Style.StateTextColorNone;
TextState = Unknown;
}
else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0)
{
@ -547,13 +520,11 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
{
HealthBoxColor = Settings.Style.StateTextColorSpectator;
HealthTextColor = Settings.Style.StateTextColorSpectator;
TextState = class'KFCommon_LocalizedStrings'.default.SpectatorString;
}
else
{
HealthBoxColor = Settings.Style.StateTextColorDead;
HealthTextColor = Settings.Style.StateTextColorDead;
TextState = Dead;
}
}
else
@ -573,7 +544,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
HealthBoxColor = Settings.Style.StateBoxColorHealthLow;
HealthTextColor = Settings.Style.StateTextColorHealthLow;
}
TextHealth = String(KFPRI.PlayerHealth);
}
// Health box
@ -585,25 +555,13 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
Settings.Style.EdgeSize,
ShapeHealth);
if (TextState != "")
{
SetDrawColor(C, HealthTextColor);
if (CurrentRank.ApplyColorToFields.Health)
SetDrawColor(C, CurrentRank.TextColor);
DrawTextShadowHVCenter(TextState, HealthXPos, TextYOffset, HealthWBox, FontScalar);
XPos += HealthWBox;
}
else
{
if (CurrentRank.ApplyColorToFields.Health)
SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, HealthTextColor);
DrawTextShadowHVCenter(TextHealth, HealthXPos, TextYOffset, HealthWBox, FontScalar);
if (KFPRI.PlayerHealth > 0)
DrawTextShadowHVCenter(String(KFPRI.PlayerHealth), HealthXPos, TextYOffset, HealthWBox, FontScalar);
XPos += HealthWBox;
}
// PlayerBox
if (PlayerIndex == Index)
@ -640,14 +598,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
Settings.Style.EdgeSize,
Shape);
// Rank
if (CurrentRank.ApplyColorToFields.Rank)
SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.RankTextColor);
S = CurrentRank.Rank;
DrawTextShadowHLeftVCenter(S, RankXPos, TextYOffset, FontScalar);
// Perk
RealPlayerWBox = PlayerWBox;
if (bIsZED)
@ -708,6 +658,11 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
if (CurrentRank.ApplyColorToFields.Level)
SetDrawColor(C, CurrentRank.TextColor);
if (CurrentRank.ApplyColorToFields.Perk)
SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.PerkNoneTextColor);
S = KFPRI.CurrentPerkClass.default.PerkName;
DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar);
}
@ -715,12 +670,22 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
{
if (CurrentRank.ApplyColorToFields.Perk)
SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.PerkNoneTextColor);
S = NoPerk;
DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar);
RealPlayerWBox = PerkXPos - PlayerXPos;
}
}
// Rank
if (CurrentRank.ApplyColorToFields.Rank)
SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.PerkNoneTextColor);
S = CurrentRank.Rank;
DrawTextShadowHRightVCenter(S, PlayerXPos, TextYOffset, PerkIconPosX - PlayerXPos - (BorderSize * 2), FontScalar);
// Avatar
if (KFPRI.Avatar != None)
{
@ -775,7 +740,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, Settings.Style.DoshTextColorMid); // TODO
StrValue = String(int(KFPRI.Score)); //StrValue = GetNiceSize(int(KFPRI.Score));
StrValue = GetNiceSize(int(KFPRI.Score));
}
DrawTextShadowHVCenter(StrValue, DoshXPos, TextYOffset, DoshWBox, FontScalar);
@ -854,7 +819,7 @@ static final function Texture2D FindAvatar(KFPlayerController PC, UniqueNetId Cl
final static function string GetNiceSize(int Num)
{
if (Num < 1000 ) return string(Num);
if (Num < 10000 ) return string(Num);
else if (Num < 1000000 ) return (Num / 1000) $ "K";
else if (Num < 1000000000 ) return (Num / 1000000) $ "M";
@ -874,7 +839,7 @@ defaultproperties
PingBars=5.0
Begin Object Class=KFGUI_List Name=PlayerList
XSize=0.7
XSize=PlayerListWidthRatio
OnDrawItem=DrawPlayerEntry
ID="PlayerList"
bClickable=false

View File

@ -15,9 +15,6 @@ var config int ShapeHeaderBox;
var config int ShapeStateHealthBoxTopPlayer;
var config int ShapeStateHealthBoxMidPlayer;
var config int ShapeStateHealthBoxBottomPlayer;
var config int ShapeStateArmorBoxTopPlayer;
var config int ShapeStateArmorBoxMidPlayer;
var config int ShapeStateArmorBoxBottomPlayer;
var config int ShapePlayerBoxTopPlayer;
var config int ShapePlayerBoxMidPlayer;
var config int ShapePlayerBoxBottomPlayer;
@ -55,10 +52,6 @@ var config ColorRGBA StateBoxColorNone;
var config ColorRGBA StateBoxColorHealthLow;
var config ColorRGBA StateBoxColorHealthMid;
var config ColorRGBA StateBoxColorHealthHigh;
var config ColorRGBA StateBoxColorArmorLow;
var config ColorRGBA StateBoxColorArmorMid;
var config ColorRGBA StateBoxColorArmorHigh;
var config ColorRGBA StateBoxColorArmorNone;
// Player box
var config ColorRGBA PlayerOwnerBoxColor;
@ -78,10 +71,6 @@ var config ColorRGBA StateTextColorNone;
var config ColorRGBA StateTextColorHealthLow;
var config ColorRGBA StateTextColorHealthMid;
var config ColorRGBA StateTextColorHealthHigh;
var config ColorRGBA StateTextColorArmorLow;
var config ColorRGBA StateTextColorArmorMid;
var config ColorRGBA StateTextColorArmorHigh;
var config ColorRGBA StateTextColorArmorNone;
// Rank text
var config ColorRGBA RankTextColor;
@ -132,9 +121,7 @@ var config ColorRGBA PingTextColorHigh;
// Other settings
var config bool bShowPingBars;
var config bool bHealthBoxSmoothColorChange;
var config bool bArmorBoxSmoothColorChange;
var config bool bHealthTextSmoothColorChange;
var config bool bArmorTextSmoothColorChange;
var config bool bLevelTextSmoothColorChange;
var config bool bDoshTextSmoothColorChange;
var config bool bKillsTextSmoothColorChange;
@ -156,8 +143,6 @@ public static function InitConfig(int ConfigVersion)
default.AssistsTextColorHigh = DefaultStyle.AssistsTextColorHigh;
default.AssistsTextColorLow = DefaultStyle.AssistsTextColorLow;
default.AssistsTextColorMid = DefaultStyle.AssistsTextColorMid;
default.bArmorBoxSmoothColorChange = DefaultStyle.ArmorBoxSmoothColorChange;
default.bArmorTextSmoothColorChange = DefaultStyle.ArmorTextSmoothColorChange;
default.bAssistsTextSmoothColorChange = DefaultStyle.AssistsTextSmoothColorChange;
default.bDoshTextSmoothColorChange = DefaultStyle.DoshTextSmoothColorChange;
default.bHealthBoxSmoothColorChange = DefaultStyle.HealthBoxSmoothColorChange;
@ -186,10 +171,6 @@ public static function InitConfig(int ConfigVersion)
default.PerkSupportTextColor = DefaultStyle.PerkSupportTextColor;
default.PerkSurvivalistTextColor = DefaultStyle.PerkSurvivalistTextColor;
default.PerkSwatTextColor = DefaultStyle.PerkSwatTextColor;
default.StateBoxColorArmorHigh = DefaultStyle.StateBoxColorArmorHigh;
default.StateBoxColorArmorLow = DefaultStyle.StateBoxColorArmorLow;
default.StateBoxColorArmorMid = DefaultStyle.StateBoxColorArmorMid;
default.StateBoxColorArmorNone = DefaultStyle.StateBoxColorArmorNone;
default.StateBoxColorDead = DefaultStyle.StateBoxColorDead;
default.StateBoxColorNone = DefaultStyle.StateBoxColorNone;
default.StateBoxColorHealthHigh = DefaultStyle.StateBoxColorHealthHigh;
@ -199,10 +180,6 @@ public static function InitConfig(int ConfigVersion)
default.StateBoxColorNotReady = DefaultStyle.StateBoxColorNotReady;
default.StateBoxColorReady = DefaultStyle.StateBoxColorReady;
default.StateBoxColorSpectator = DefaultStyle.StateBoxColorSpectator;
default.StateTextColorArmorHigh = DefaultStyle.StateTextColorArmorHigh;
default.StateTextColorArmorLow = DefaultStyle.StateTextColorArmorLow;
default.StateTextColorArmorMid = DefaultStyle.StateTextColorArmorMid;
default.StateTextColorArmorNone = DefaultStyle.StateTextColorArmorNone;
default.StateTextColorNone = DefaultStyle.StateTextColorNone;
default.StateTextColorHealthHigh = DefaultStyle.StateTextColorHealthHigh;
default.StateTextColorHealthLow = DefaultStyle.StateTextColorHealthLow;
@ -211,9 +188,6 @@ public static function InitConfig(int ConfigVersion)
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());
@ -248,9 +222,6 @@ public static function YASStyle Settings()
Settings.ShapeStateHealthBoxTopPlayer = default.ShapeStateHealthBoxTopPlayer;
Settings.ShapeStateHealthBoxMidPlayer = default.ShapeStateHealthBoxMidPlayer;
Settings.ShapeStateHealthBoxBottomPlayer = default.ShapeStateHealthBoxBottomPlayer;
Settings.ShapeStateArmorBoxTopPlayer = default.ShapeStateArmorBoxTopPlayer;
Settings.ShapeStateArmorBoxMidPlayer = default.ShapeStateArmorBoxMidPlayer;
Settings.ShapeStateArmorBoxBottomPlayer = default.ShapeStateArmorBoxBottomPlayer;
Settings.ShapePlayerBoxTopPlayer = default.ShapePlayerBoxTopPlayer;
Settings.ShapePlayerBoxMidPlayer = default.ShapePlayerBoxMidPlayer;
Settings.ShapePlayerBoxBottomPlayer = default.ShapePlayerBoxBottomPlayer;
@ -288,10 +259,6 @@ public static function YASStyle Settings()
Settings.StateBoxColorHealthLow = default.StateBoxColorHealthLow;
Settings.StateBoxColorHealthMid = default.StateBoxColorHealthMid;
Settings.StateBoxColorHealthHigh = default.StateBoxColorHealthHigh;
Settings.StateBoxColorArmorLow = default.StateBoxColorArmorLow;
Settings.StateBoxColorArmorMid = default.StateBoxColorArmorMid;
Settings.StateBoxColorArmorHigh = default.StateBoxColorArmorHigh;
Settings.StateBoxColorArmorNone = default.StateBoxColorArmorNone;
// Player box
Settings.PlayerOwnerBoxColor = default.PlayerOwnerBoxColor;
@ -311,10 +278,6 @@ public static function YASStyle Settings()
Settings.StateTextColorHealthLow = default.StateTextColorHealthLow;
Settings.StateTextColorHealthMid = default.StateTextColorHealthMid;
Settings.StateTextColorHealthHigh = default.StateTextColorHealthHigh;
Settings.StateTextColorArmorLow = default.StateTextColorArmorLow;
Settings.StateTextColorArmorMid = default.StateTextColorArmorMid;
Settings.StateTextColorArmorHigh = default.StateTextColorArmorHigh;
Settings.StateTextColorArmorNone = default.StateTextColorArmorNone;
// Rank text
Settings.RankTextColor = default.RankTextColor;
@ -365,9 +328,7 @@ public static function YASStyle Settings()
// 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;
@ -391,9 +352,6 @@ public static function WriteSettings(YASStyle Settings)
default.ShapeStateHealthBoxTopPlayer = Settings.ShapeStateHealthBoxTopPlayer;
default.ShapeStateHealthBoxMidPlayer = Settings.ShapeStateHealthBoxMidPlayer;
default.ShapeStateHealthBoxBottomPlayer = Settings.ShapeStateHealthBoxBottomPlayer;
default.ShapeStateArmorBoxTopPlayer = Settings.ShapeStateArmorBoxTopPlayer;
default.ShapeStateArmorBoxMidPlayer = Settings.ShapeStateArmorBoxMidPlayer;
default.ShapeStateArmorBoxBottomPlayer = Settings.ShapeStateArmorBoxBottomPlayer;
default.ShapePlayerBoxTopPlayer = Settings.ShapePlayerBoxTopPlayer;
default.ShapePlayerBoxMidPlayer = Settings.ShapePlayerBoxMidPlayer;
default.ShapePlayerBoxBottomPlayer = Settings.ShapePlayerBoxBottomPlayer;
@ -431,10 +389,6 @@ public static function WriteSettings(YASStyle Settings)
default.StateBoxColorHealthLow = Settings.StateBoxColorHealthLow;
default.StateBoxColorHealthMid = Settings.StateBoxColorHealthMid;
default.StateBoxColorHealthHigh = Settings.StateBoxColorHealthHigh;
default.StateBoxColorArmorLow = Settings.StateBoxColorArmorLow;
default.StateBoxColorArmorMid = Settings.StateBoxColorArmorMid;
default.StateBoxColorArmorHigh = Settings.StateBoxColorArmorHigh;
default.StateBoxColorArmorNone = Settings.StateBoxColorArmorNone;
// Player box
default.PlayerOwnerBoxColor = Settings.PlayerOwnerBoxColor;
@ -454,10 +408,6 @@ public static function WriteSettings(YASStyle Settings)
default.StateTextColorHealthLow = Settings.StateTextColorHealthLow;
default.StateTextColorHealthMid = Settings.StateTextColorHealthMid;
default.StateTextColorHealthHigh = Settings.StateTextColorHealthHigh;
default.StateTextColorArmorLow = Settings.StateTextColorArmorLow;
default.StateTextColorArmorMid = Settings.StateTextColorArmorMid;
default.StateTextColorArmorHigh = Settings.StateTextColorArmorHigh;
default.StateTextColorArmorNone = Settings.StateTextColorArmorNone;
// Rank text
default.RankTextColor = Settings.RankTextColor;
@ -508,9 +458,7 @@ public static function WriteSettings(YASStyle Settings)
// Other settings
default.bShowPingBars = Settings.ShowPingBars;
default.bHealthBoxSmoothColorChange = Settings.HealthBoxSmoothColorChange;
default.bArmorBoxSmoothColorChange = Settings.ArmorBoxSmoothColorChange;
default.bHealthTextSmoothColorChange = Settings.HealthTextSmoothColorChange;
default.bArmorTextSmoothColorChange = Settings.ArmorTextSmoothColorChange;
default.bLevelTextSmoothColorChange = Settings.LevelTextSmoothColorChange;
default.bDoshTextSmoothColorChange = Settings.DoshTextSmoothColorChange;
default.bKillsTextSmoothColorChange = Settings.KillsTextSmoothColorChange;

View File

@ -1,58 +0,0 @@
class SettingsArmor extends Object
dependson(Types)
config(YAS);
`include(Build.uci)
`include(Logger.uci)
var config int Low;
var config int High;
public static function InitConfig(int ConfigVersion)
{
`callstack_static("InitConfig");
switch (ConfigVersion)
{
case 0:
case 1:
WriteSettings(DefaultSettings());
case 2147483647:
StaticSaveConfig();
}
}
public static function YASSettingsArmor DefaultSettings()
{
local YASSettingsArmor Settings;
`callstack_static("DefaultSettings");
return Settings;
}
public static function YASSettingsArmor Settings()
{
local YASSettingsArmor Settings;
`callstack_static("Settings");
Settings.Low = default.Low;
Settings.High = default.High;
return Settings;
}
public static function WriteSettings(YASSettingsArmor Settings)
{
`callstack_static("WriteSettings");
default.Low = Settings.Low;
default.High = Settings.High;
}
defaultproperties
{
}

View File

@ -26,7 +26,6 @@ struct Fields
var bool Kills;
var bool Assists;
var bool Health;
var bool Armor;
var bool Ping;
Structdefaultproperties
@ -39,7 +38,6 @@ struct Fields
Kills = false;
Assists = false;
Health = false;
Armor = false;
Ping = false;
}
};
@ -85,7 +83,7 @@ struct YASSettingsAdmin
{
Rank = "Admin"
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, Armor=False, Ping=False)
ApplyColorToFields = (Rank=True, Player=True, Level=False, Perk=False, Dosh=False, Kills=False, Assists=False, Health=False, Ping=False)
}
};
@ -99,7 +97,7 @@ struct YASSettingsPlayer
{
Rank = "Player"
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, Armor=False, Ping=False)
ApplyColorToFields = (Rank=True, Player=True, Level=False, Perk=False, Dosh=False, Kills=False, Assists=False, Health=False, Ping=False)
}
};
@ -115,18 +113,6 @@ struct YASSettingsHealth
}
};
struct YASSettingsArmor
{
var int Low;
var int High;
Structdefaultproperties
{
Low = 40
High = 80
}
};
struct YASSettingsPing
{
var int Low;
@ -169,9 +155,6 @@ struct YASStyle
var int ShapeStateHealthBoxTopPlayer;
var int ShapeStateHealthBoxMidPlayer;
var int ShapeStateHealthBoxBottomPlayer;
var int ShapeStateArmorBoxTopPlayer;
var int ShapeStateArmorBoxMidPlayer;
var int ShapeStateArmorBoxBottomPlayer;
var int ShapePlayerBoxTopPlayer;
var int ShapePlayerBoxMidPlayer;
var int ShapePlayerBoxBottomPlayer;
@ -209,10 +192,6 @@ struct YASStyle
var ColorRGBA StateBoxColorHealthLow;
var ColorRGBA StateBoxColorHealthMid;
var ColorRGBA StateBoxColorHealthHigh;
var ColorRGBA StateBoxColorArmorLow;
var ColorRGBA StateBoxColorArmorMid;
var ColorRGBA StateBoxColorArmorHigh;
var ColorRGBA StateBoxColorArmorNone;
// Player box
var ColorRGBA PlayerOwnerBoxColor;
@ -232,10 +211,6 @@ struct YASStyle
var ColorRGBA StateTextColorHealthLow;
var ColorRGBA StateTextColorHealthMid;
var ColorRGBA StateTextColorHealthHigh;
var ColorRGBA StateTextColorArmorLow;
var ColorRGBA StateTextColorArmorMid;
var ColorRGBA StateTextColorArmorHigh;
var ColorRGBA StateTextColorArmorNone;
// Rank text
var ColorRGBA RankTextColor;
@ -286,9 +261,7 @@ struct YASStyle
// Other settings
var bool ShowPingBars;
var bool HealthBoxSmoothColorChange;
var bool ArmorBoxSmoothColorChange;
var bool HealthTextSmoothColorChange;
var bool ArmorTextSmoothColorChange;
var bool LevelTextSmoothColorChange;
var bool DoshTextSmoothColorChange;
var bool KillsTextSmoothColorChange;
@ -305,18 +278,15 @@ struct YASStyle
ShapeWaveInfoBox = 0
ShapePlayersCountBox = 152
ShapeHeaderBox = 150
ShapeStateHealthBoxTopPlayer = 151
ShapeStateHealthBoxMidPlayer = 151
ShapeStateHealthBoxBottomPlayer = 151
ShapeStateArmorBoxTopPlayer = 151
ShapeStateArmorBoxMidPlayer = 151
ShapeStateArmorBoxBottomPlayer = 151
ShapePlayerBoxTopPlayer = 0
ShapePlayerBoxMidPlayer = 0
ShapePlayerBoxBottomPlayer = 0
ShapeStatsBoxTopPlayer = 153
ShapeStatsBoxMidPlayer = 153
ShapeStatsBoxBottomPlayer = 153
ShapeStateHealthBoxTopPlayer = 0
ShapeStateHealthBoxMidPlayer = 0
ShapeStateHealthBoxBottomPlayer = 0
ShapePlayerBoxTopPlayer = 121
ShapePlayerBoxMidPlayer = 121
ShapePlayerBoxBottomPlayer = 121
ShapeStatsBoxTopPlayer = 0
ShapeStatsBoxMidPlayer = 0
ShapeStatsBoxBottomPlayer = 0
// Server box
ServerNameBoxColor = (R=75, G=0, B=0, A=200)
@ -348,10 +318,6 @@ struct YASStyle
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)
StateBoxColorArmorLow = (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)
StateBoxColorArmorNone = (R=30, G=30, B=30, A=150)
// Player box
PlayerOwnerBoxColor = (R=100, G=10, B=10, A=150)
@ -371,10 +337,6 @@ struct YASStyle
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)
StateTextColorArmorLow = (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)
StateTextColorArmorNone = (R=0, G=0, B=0 , A=0 )
// Rank text
RankTextColor = (R=250, G=250, B=250, A=255)
@ -425,9 +387,7 @@ struct YASStyle
// Other settings
ShowPingBars = true
HealthBoxSmoothColorChange = true
ArmorBoxSmoothColorChange = true
HealthTextSmoothColorChange = false
ArmorTextSmoothColorChange = false
LevelTextSmoothColorChange = false
DoshTextSmoothColorChange = false
KillsTextSmoothColorChange = false
@ -444,6 +404,5 @@ struct YASSettings
var YASSettingsPing Ping;
var YASSettingsLevel Level;
var YASSettingsHealth Health;
var YASSettingsArmor Armor;
};

View File

@ -34,7 +34,6 @@ function PostBeginPlay()
Settings.Admin = class'SystemAdminRank'.static.Settings();
Settings.Player = class'SystemPlayerRank'.static.Settings();
Settings.Health = class'SettingsHealth'.static.Settings();
Settings.Armor = class'SettingsArmor'.static.Settings();
Settings.Ping = class'SettingsPing'.static.Settings();
Settings.Level = class'SettingsLevel'.static.Settings();
}
@ -74,7 +73,6 @@ private function InitConfig()
class'SystemAdminRank'.static.InitConfig(ConfigVersion);
class'SystemPlayerRank'.static.InitConfig(ConfigVersion);
class'SettingsHealth'.static.InitConfig(ConfigVersion);
class'SettingsArmor'.static.InitConfig(ConfigVersion);
class'SettingsPing'.static.InitConfig(ConfigVersion);
class'SettingsLevel'.static.InitConfig(ConfigVersion);
class'CustomRanks'.static.InitConfig(ConfigVersion);