remove hardcoded ListItemsPerPage

This commit is contained in:
GenZmeY 2021-07-11 22:41:47 +03:00
parent e8cdfe11f4
commit f3d2c7a5f1

View File

@ -4,8 +4,8 @@ class KFScoreBoard extends KFGUI_Page
`include(Build.uci) `include(Build.uci)
`include(Logger.uci) `include(Logger.uci)
var transient float HealthXPos, ArmorXPos, RankXPos, PlayerXPos, LevelXPos, PerkXPos, DoshXPos, KillsXPos, AssistXPos, PingXPos; var transient float HealthXPos, ArmorXPos, RankXPos, PlayerXPos, LevelXPos, PerkXPos, DoshXPos, KillsXPos, AssistXPos, PingXPos, ScrollXPos;
var transient float HealthWBox, ArmorWBox, RankWBox, PlayerWBox, LevelWBox, PerkWBox, DoshWBox, KillsWBox, AssistWBox, PingWBox; var transient float HealthWBox, ArmorWBox, RankWBox, PlayerWBox, LevelWBox, PerkWBox, DoshWBox, KillsWBox, AssistWBox, PingWBox, ScrollWBox;
var transient float NextScoreboardRefresh; var transient float NextScoreboardRefresh;
var transient int NumPlayer; var transient int NumPlayer;
@ -315,7 +315,7 @@ function DrawMenu()
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.PingString$" ", XL, YL, FontScalar, FontScalar); Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.PingString$" ", XL, YL, FontScalar, FontScalar);
PingWBox = XL < MinBoxW ? MinBoxW : XL; PingWBox = XL < MinBoxW ? MinBoxW : XL;
if (NumPlayer <= 16) // TODO: Replace hardcoded 16 if (NumPlayer <= PlayersList.ListItemsPerPage)
ScrollBarWidth = 0; ScrollBarWidth = 0;
else else
ScrollBarWidth = BorderSize * 8; ScrollBarWidth = BorderSize * 8;