fix width

This commit is contained in:
GenZmeY 2021-06-13 05:29:47 +03:00
parent 670b269c9f
commit 09ea64e941
2 changed files with 6 additions and 9 deletions

View File

@ -1,5 +1,4 @@
# ScoreboardExt # ScoreboardExt
**TODO:** **TODO:**
1. Check fields char capacity (crop if text is large then cap) 1. Localization
2. Localization

View File

@ -18,7 +18,7 @@ var array<KFPlayerReplicationInfo> KFPRIArray;
var KFPlayerController OwnerPC; var KFPlayerController OwnerPC;
var Color PingColor; var Color PingColor;
var float PingBars,IdealPing,MaxPing; var float PingBars;
// Ranks // Ranks
var array<RankInfo> CustomRanks; var array<RankInfo> CustomRanks;
@ -236,7 +236,7 @@ function DrawMenu()
YPos += BoxH; YPos += BoxH;
// Header // Header
Width = Canvas.ClipX * 0.625; Width = Canvas.ClipX * 0.7;
XPos = (Canvas.ClipX - Width) * 0.5; XPos = (Canvas.ClipX - Width) * 0.5;
YPos += YL; YPos += YL;
BoxH = YL + BorderSize; BoxH = YL + BorderSize;
@ -652,7 +652,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
S = string(Ping); S = string(Ping);
} }
C.TextSize(MaxPing, 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.Ping.ShowPingBars ? PingWBox/2 : PingWBox, FontScalar);
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);
if (Settings.Ping.ShowPingBars) if (Settings.Ping.ShowPingBars)
@ -722,12 +722,10 @@ defaultproperties
bEnableInputs=true bEnableInputs=true
PingColor=(R=255,G=255,B=60,A=255) PingColor=(R=255,G=255,B=60,A=255)
IdealPing=50.0
MaxPing=200.0
PingBars=5.0 PingBars=5.0
Begin Object Class=KFGUI_List Name=PlayerList Begin Object Class=KFGUI_List Name=PlayerList
XSize=0.625 XSize=0.7
OnDrawItem=DrawPlayerEntry OnDrawItem=DrawPlayerEntry
ID="PlayerList" ID="PlayerList"
bClickable=false bClickable=false