add server time

This commit is contained in:
zeno0207 2024-07-19 20:24:44 +08:00 committed by GitHub
parent f1408da29a
commit 925844e20a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,5 @@
class YAS_ScoreBoard extends KFGUI_Page class YAS_ScoreBoard extends KFGUI_Page
config(YAS)
dependson(YAS_Types); dependson(YAS_Types);
const LocalMessage = class'YAS_LocalMessage'; const LocalMessage = class'YAS_LocalMessage';
@ -245,6 +246,7 @@ function DrawMenu()
local float BorderSize, EdgeSize, PlayerListSizeY; local float BorderSize, EdgeSize, PlayerListSizeY;
local Color ColorTMP; local Color ColorTMP;
local Array<String> MessageOfTheDayLines; local Array<String> MessageOfTheDayLines;
local int Y,M,DW,D,H,Min,Sec,MSec;
PC = GetPlayer(); PC = GetPlayer();
if (GetKFGRI() == None) if (GetKFGRI() == None)
@ -429,11 +431,13 @@ function DrawMenu()
MakeColor(250,250,250,250)); MakeColor(250,250,250,250));
*/ */
GetSystemTime(Y,M,DW,D,H,Min,Sec,MSec);
Canvas.SetDrawColorStruct(Settings.Style.PlayerCountTextColor); Canvas.SetDrawColorStruct(Settings.Style.PlayerCountTextColor);
S = LocalMessage.static.GetLocalizedString(YAS_Players) $ ":" S = LocalMessage.static.GetLocalizedString(YAS_Players) $ ":"
@ NumPlayer @ "/" @ KFGRI.MaxHumanCount $ " " @ NumPlayer @ "/" @ KFGRI.MaxHumanCount $ " "
$ LocalMessage.static.GetLocalizedString(YAS_Spectators) $ ": " $ NumSpec; ; $ LocalMessage.static.GetLocalizedString(YAS_Spectators) $ ": " $ NumSpec
Canvas.TextSize(S, XL, YL, FontScalar, FontScalar); $ " "$Y$"/"$M$"/"$D$" "$H$":"$Min $":"$Sec; ;
Canvas.TextSize(S, XL, YL, FontScalar, FontScalar);
DrawTextShadowHLeftVCenter(S, BoxX + EdgeSize, YPos, BoxH, FontScalar); DrawTextShadowHLeftVCenter(S, BoxX + EdgeSize, YPos, BoxH, FontScalar);
S = Owner.CurrentStyle.GetTimeString(KFGRI.ElapsedTime); S = Owner.CurrentStyle.GetTimeString(KFGRI.ElapsedTime);
@ -1068,4 +1072,4 @@ defaultproperties
Components.Add(PlayerList) Components.Add(PlayerList)
DefaultAvatar=Texture2D'UI_HUD.ScoreBoard_Standard_SWF_I26' DefaultAvatar=Texture2D'UI_HUD.ScoreBoard_Standard_SWF_I26'
} }