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
**TODO:**
1. Check fields char capacity (crop if text is large then cap)
2. Localization
1. Localization

View File

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