add shape settings
This commit is contained in:
parent
73419a58f2
commit
5a70c4a4ac
@ -630,6 +630,18 @@ final function DrawRectBox(float X, float Y, float Width, float Height, int Edge
|
||||
DrawCornerTex(Edge, 2);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// ______
|
||||
// | |
|
||||
// | |
|
||||
// |______|
|
||||
// Top left
|
||||
Canvas.SetPos(X, Y);
|
||||
|
||||
// Fill
|
||||
Canvas.SetPos(X, Y);
|
||||
DrawWhiteBox(Width, Height);
|
||||
|
||||
default:
|
||||
// ______
|
||||
// / \
|
||||
|
@ -188,7 +188,7 @@ function DrawMenu()
|
||||
|
||||
// Top Rect (Server name)
|
||||
SetDrawColor(Canvas, Settings.Style.ServerNameBoxColor);
|
||||
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Edge, 2);
|
||||
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Edge, Settings.Style.ShapeServerNameBox);
|
||||
|
||||
SetDrawColor(Canvas, Settings.Style.ServerNameTextColor);
|
||||
S = KFGRI.ServerName;
|
||||
@ -200,7 +200,7 @@ function DrawMenu()
|
||||
BoxW = Width * 0.7;
|
||||
BoxH = YL * 2 + BorderSize * 2;
|
||||
SetDrawColor(Canvas, Settings.Style.GameInfoBoxColor);
|
||||
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Edge, 1);
|
||||
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Edge, Settings.Style.ShapeGameInfoBox);
|
||||
|
||||
SetDrawColor(Canvas, Settings.Style.GameInfoTextColor);
|
||||
S = class'KFCommon_LocalizedStrings'.static.GetFriendlyMapName(PC.WorldInfo.GetMapName(true));
|
||||
@ -213,7 +213,7 @@ function DrawMenu()
|
||||
BoxX = BoxX + BoxW;
|
||||
BoxW = Width - BoxW;
|
||||
SetDrawColor(Canvas, Settings.Style.WaveBoxColor);
|
||||
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Edge, 0);
|
||||
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Edge, Settings.Style.ShapeWaveInfoBox);
|
||||
|
||||
SetDrawColor(Canvas, Settings.Style.WaveTextColor);
|
||||
S = class'KFGFxHUD_ScoreboardMapInfoContainer'.default.WaveString;
|
||||
@ -227,7 +227,7 @@ function DrawMenu()
|
||||
BoxW = Width;
|
||||
BoxH = YL + BorderSize;
|
||||
SetDrawColor(Canvas, Settings.Style.PlayerCountBoxColor);
|
||||
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Edge, 4);
|
||||
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Edge, Settings.Style.ShapePlayersCountBox);
|
||||
|
||||
SetDrawColor(Canvas, Settings.Style.PlayerCountTextColor);
|
||||
S = Players$": " $ NumPlayer $ " / " $ KFGRI.MaxHumanCount $ " " $ Spectators $ ": " $ NumSpec;
|
||||
@ -257,7 +257,7 @@ function DrawMenu()
|
||||
Width + BorderSize * 4,
|
||||
BoxH,
|
||||
Edge,
|
||||
2);
|
||||
Settings.Style.ShapeHeaderBox);
|
||||
|
||||
// Calc X offsets
|
||||
MinBoxW = Width * 0.07; // minimum width for column
|
||||
@ -351,6 +351,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
||||
local RankInfo CurrentRank;
|
||||
local bool HasRank;
|
||||
local int PlayerInfoIndex, PlayerRankIndex;
|
||||
local int Shape;
|
||||
|
||||
YOffset *= 1.05;
|
||||
KFPRI = KFPRIArray[Index];
|
||||
@ -429,12 +430,19 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
||||
if (!Settings.State.Dynamic)
|
||||
SetDrawColor(C, Settings.Style.LeftStateBoxColor);
|
||||
|
||||
if (Index == 0)
|
||||
Shape = Settings.Style.ShapeLeftStateBoxTopPlayer;
|
||||
else if (Index == KFPRIArray.Length - 1)
|
||||
Shape = Settings.Style.ShapeLeftStateBoxBottomPlayer;
|
||||
else
|
||||
Shape = Settings.Style.ShapeLeftStateBoxMidPlayer;
|
||||
|
||||
BoxWidth = Owner.HUDOwner.ScaledBorderSize * 8;
|
||||
Owner.CurrentStyle.DrawRectBox( XPos,
|
||||
YOffset,
|
||||
BoxWidth,
|
||||
Height,
|
||||
8, 1);
|
||||
8, Shape);
|
||||
|
||||
XPos += BoxWidth;
|
||||
|
||||
@ -444,19 +452,33 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
||||
else
|
||||
SetDrawColor(C, Settings.Style.PlayerBoxColor);
|
||||
|
||||
if (Index == 0)
|
||||
Shape = Settings.Style.ShapePlayerBoxTopPlayer;
|
||||
else if (Index == KFPRIArray.Length - 1)
|
||||
Shape = Settings.Style.ShapePlayerBoxBottomPlayer;
|
||||
else
|
||||
Shape = Settings.Style.ShapePlayerBoxMidPlayer;
|
||||
|
||||
BoxWidth = CashXPos + Owner.HUDOwner.ScaledBorderSize - BoxWidth;
|
||||
Owner.CurrentStyle.DrawRectBox(XPos, YOffset, BoxWidth, Height, 8);
|
||||
Owner.CurrentStyle.DrawRectBox(XPos, YOffset, BoxWidth, Height, 8, Shape);
|
||||
|
||||
XPos += BoxWidth;
|
||||
|
||||
// Right stats box
|
||||
if (Index == 0)
|
||||
Shape = Settings.Style.ShapeStatsBoxTopPlayer;
|
||||
else if (Index == KFPRIArray.Length - 1)
|
||||
Shape = Settings.Style.ShapeStatsBoxBottomPlayer;
|
||||
else
|
||||
Shape = Settings.Style.ShapeStatsBoxMidPlayer;
|
||||
|
||||
BoxWidth = Width - XPos;
|
||||
SetDrawColor(C, Settings.Style.StatsBoxColor);
|
||||
Owner.CurrentStyle.DrawRectBox( XPos,
|
||||
YOffset,
|
||||
BoxWidth,
|
||||
Height,
|
||||
8, 3);
|
||||
8, Shape);
|
||||
|
||||
// Rank
|
||||
if (CurrentRank.ApplyColorToFields.Rank)
|
||||
|
@ -5,6 +5,20 @@ class ScoreboardStyle extends Object
|
||||
`include(Build.uci)
|
||||
`include(Logger.uci)
|
||||
|
||||
var config int ShapeServerNameBox;
|
||||
var config int ShapeGameInfoBox;
|
||||
var config int ShapeWaveInfoBox;
|
||||
var config int ShapePlayersCountBox;
|
||||
var config int ShapeHeaderBox;
|
||||
var config int ShapeLeftStateBoxTopPlayer;
|
||||
var config int ShapeLeftStateBoxMidPlayer;
|
||||
var config int ShapeLeftStateBoxBottomPlayer;
|
||||
var config int ShapePlayerBoxTopPlayer;
|
||||
var config int ShapePlayerBoxMidPlayer;
|
||||
var config int ShapePlayerBoxBottomPlayer;
|
||||
var config int ShapeStatsBoxTopPlayer;
|
||||
var config int ShapeStatsBoxMidPlayer;
|
||||
var config int ShapeStatsBoxBottomPlayer;
|
||||
var config ColorRGBA ServerNameBoxColor;
|
||||
var config ColorRGBA ServerNameTextColor;
|
||||
var config ColorRGBA GameInfoBoxColor;
|
||||
@ -60,6 +74,20 @@ public static function SCEStyle Settings()
|
||||
|
||||
`callstack_static("Settings");
|
||||
|
||||
Settings.ShapeServerNameBox = default.ShapeServerNameBox;
|
||||
Settings.ShapeGameInfoBox = default.ShapeGameInfoBox;
|
||||
Settings.ShapeWaveInfoBox = default.ShapeWaveInfoBox;
|
||||
Settings.ShapePlayersCountBox = default.ShapePlayersCountBox;
|
||||
Settings.ShapeHeaderBox = default.ShapeHeaderBox;
|
||||
Settings.ShapeLeftStateBoxTopPlayer = default.ShapeLeftStateBoxTopPlayer;
|
||||
Settings.ShapeLeftStateBoxMidPlayer = default.ShapeLeftStateBoxMidPlayer;
|
||||
Settings.ShapeLeftStateBoxBottomPlayer = default.ShapeLeftStateBoxBottomPlayer;
|
||||
Settings.ShapePlayerBoxTopPlayer = default.ShapePlayerBoxTopPlayer;
|
||||
Settings.ShapePlayerBoxMidPlayer = default.ShapePlayerBoxMidPlayer;
|
||||
Settings.ShapePlayerBoxBottomPlayer = default.ShapePlayerBoxBottomPlayer;
|
||||
Settings.ShapeStatsBoxTopPlayer = default.ShapeStatsBoxTopPlayer;
|
||||
Settings.ShapeStatsBoxMidPlayer = default.ShapeStatsBoxMidPlayer;
|
||||
Settings.ShapeStatsBoxBottomPlayer = default.ShapeStatsBoxBottomPlayer;
|
||||
Settings.ServerNameBoxColor = default.ServerNameBoxColor;
|
||||
Settings.ServerNameTextColor = default.ServerNameTextColor;
|
||||
Settings.GameInfoBoxColor = default.GameInfoBoxColor;
|
||||
@ -107,6 +135,20 @@ public static function WriteSettings(SCEStyle Settings)
|
||||
{
|
||||
`callstack_static("WriteSettings");
|
||||
|
||||
default.ShapeServerNameBox = Settings.ShapeServerNameBox;
|
||||
default.ShapeGameInfoBox = Settings.ShapeGameInfoBox;
|
||||
default.ShapeWaveInfoBox = Settings.ShapeWaveInfoBox;
|
||||
default.ShapePlayersCountBox = Settings.ShapePlayersCountBox;
|
||||
default.ShapeHeaderBox = Settings.ShapeHeaderBox;
|
||||
default.ShapeLeftStateBoxTopPlayer = Settings.ShapeLeftStateBoxTopPlayer;
|
||||
default.ShapeLeftStateBoxMidPlayer = Settings.ShapeLeftStateBoxMidPlayer;
|
||||
default.ShapeLeftStateBoxBottomPlayer = Settings.ShapeLeftStateBoxBottomPlayer;
|
||||
default.ShapePlayerBoxTopPlayer = Settings.ShapePlayerBoxTopPlayer;
|
||||
default.ShapePlayerBoxMidPlayer = Settings.ShapePlayerBoxMidPlayer;
|
||||
default.ShapePlayerBoxBottomPlayer = Settings.ShapePlayerBoxBottomPlayer;
|
||||
default.ShapeStatsBoxTopPlayer = Settings.ShapeStatsBoxTopPlayer;
|
||||
default.ShapeStatsBoxMidPlayer = Settings.ShapeStatsBoxMidPlayer;
|
||||
default.ShapeStatsBoxBottomPlayer = Settings.ShapeStatsBoxBottomPlayer;
|
||||
default.ServerNameBoxColor = Settings.ServerNameBoxColor;
|
||||
default.ServerNameTextColor = Settings.ServerNameTextColor;
|
||||
default.GameInfoBoxColor = Settings.GameInfoBoxColor;
|
||||
|
@ -153,6 +153,21 @@ struct SCESettingsLevel
|
||||
|
||||
struct SCEStyle
|
||||
{
|
||||
var int ShapeServerNameBox;
|
||||
var int ShapeGameInfoBox;
|
||||
var int ShapeWaveInfoBox;
|
||||
var int ShapePlayersCountBox;
|
||||
var int ShapeHeaderBox;
|
||||
var int ShapeLeftStateBoxTopPlayer;
|
||||
var int ShapeLeftStateBoxMidPlayer;
|
||||
var int ShapeLeftStateBoxBottomPlayer;
|
||||
var int ShapePlayerBoxTopPlayer;
|
||||
var int ShapePlayerBoxMidPlayer;
|
||||
var int ShapePlayerBoxBottomPlayer;
|
||||
var int ShapeStatsBoxTopPlayer;
|
||||
var int ShapeStatsBoxMidPlayer;
|
||||
var int ShapeStatsBoxBottomPlayer;
|
||||
|
||||
var ColorRGBA ServerNameBoxColor;
|
||||
var ColorRGBA ServerNameTextColor;
|
||||
|
||||
@ -208,6 +223,21 @@ struct SCEStyle
|
||||
|
||||
StructDefaultProperties
|
||||
{
|
||||
ShapeServerNameBox = 2
|
||||
ShapeGameInfoBox = 1
|
||||
ShapeWaveInfoBox = 0
|
||||
ShapePlayersCountBox = 4
|
||||
ShapeHeaderBox = 2
|
||||
ShapeLeftStateBoxTopPlayer = 1
|
||||
ShapeLeftStateBoxMidPlayer = 0
|
||||
ShapeLeftStateBoxBottomPlayer = 3
|
||||
ShapePlayerBoxTopPlayer = 1
|
||||
ShapePlayerBoxMidPlayer = 0
|
||||
ShapePlayerBoxBottomPlayer = 3
|
||||
ShapeStatsBoxTopPlayer = 1
|
||||
ShapeStatsBoxMidPlayer = 0
|
||||
ShapeStatsBoxBottomPlayer = 3
|
||||
|
||||
ServerNameBoxColor = (R=75, G=0, B=0, A=200)
|
||||
ServerNameTextColor = (R=250, G=250, B=250, A=255)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user