From 968703993396ad525541ad5c84e154000310789e Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Tue, 1 Sep 2020 09:25:21 +0300 Subject: [PATCH] feat: PlayerStats localization --- Localization/INT/ServerExt.int | Bin 45596 -> 46836 bytes ServerExt/Classes/UIP_PlayerSpecs.uc | 86 ++++++++++++++++++++------- 2 files changed, 63 insertions(+), 23 deletions(-) diff --git a/Localization/INT/ServerExt.int b/Localization/INT/ServerExt.int index cf391c75490b17beee25fc9d6137c61493ab0423..3595f78a5da81829c4777040b315b7c0ed7331b1 100644 GIT binary patch delta 803 zcmbR9gz3v$rVTQiCg0k?H+e%b%Ve2i8NpzN42FD$a)w}r5{5(|E}k6NBB>1%RX~U{ zC^7IdZ~^(~>J6vLTf#&YfF@)xq%tTl6vNB|vhx|zfFw*NnW2=S2nbUd@)$}cPqY%& z%>=SQI#Pk6WndCwR|rsN0Yd;o4$x(lK>e8vxeTcw_ZdQD6o9fQa!@y7(KlIts-ixo zD@(vOV49=Aki<|4a+@f`ZHYj8au{^sZaCSZ$q%u`8|W&K95~$6VeZO?iK4g&p%xfs znz&tq&`pFpxFL4BGE^`WfWk%|<_1@W2w>PDha^M|&~8=Sc0+U#VXr(aUO=(t3=GE{ zV7%r6V=@F7gB8G-Rh%de4i8Ye%3*-}9jn^#iHh|gcSF>I-HA;dgDucM2z3e!=zfIg Rhq(-zVu&&+VDj^cq5! UserID; }; + var FPageExtraInfo ExtraInfo[3]; var KFGUI_ColumnList PlayersList,TopPlayers[3]; var KFGUI_SwitchComponent MultiPager; @@ -12,6 +13,31 @@ var byte CurrentPageStatus[3]; var KFGUI_Button PreviousButton; var bool bDownloadingPage; +var KFGUI_Button TopPlaytimeButton; +var KFGUI_Button TopKillsButton; +var KFGUI_Button TopExpButton; + +var localized string ShowStatsButtonText; +var localized string ShowStatsButtonToolTip; +var localized string TopPlaytimeButtonText; +var localized string TopPlaytimeButtonToolTip; +var localized string TopKillsButtonText; +var localized string TopKillsButtonToolTip; +var localized string TopExpButtonText; +var localized string TopExpButtonToolTip; +var localized string PlayerColumnText; +var localized string TotalKillsColumnText; +var localized string TotalExpColumnText; +var localized string TotalPlaytimeColumnText; + +function FColumnItem NewFColumnItem(string Text, float Width) +{ + local FColumnItem NewItem; + NewItem.Text = Text; + NewItem.Width = Width; + return NewItem; +} + function InitMenu() { PreviousButton = KFGUI_Button(FindComponentID('Init')); @@ -21,6 +47,40 @@ function InitMenu() TopPlayers[1] = KFGUI_ColumnList(FindComponentID('Kills')); TopPlayers[2] = KFGUI_ColumnList(FindComponentID('EXP')); MultiPager = KFGUI_SwitchComponent(FindComponentID('Pager')); + + TopPlaytimeButton=KFGUI_Button(FindComponentID('Playtime')); + TopKillsButton=KFGUI_Button(FindComponentID('Kills')); + TopExpButton=KFGUI_Button(FindComponentID('Exp')); + + PreviousButton.ButtonText=ShowStatsButtonText; + PreviousButton.Tooltip=ShowStatsButtonToolTip; + + TopPlaytimeButton.ButtonText=TopPlaytimeButtonText; + TopPlaytimeButton.Tooltip=TopPlaytimeButtonToolTip; + + TopKillsButton.ButtonText=TopKillsButtonText; + TopKillsButton.Tooltip=TopKillsButtonToolTip; + + TopExpButton.ButtonText=TopExpButtonText; + TopExpButton.Tooltip=TopExpButtonToolTip; + + PlayersList.Columns.AddItem(NewFColumnItem(PlayerColumnText,0.55)); + PlayersList.Columns.AddItem(NewFColumnItem(TotalKillsColumnText,0.15)); + PlayersList.Columns.AddItem(NewFColumnItem(TotalExpColumnText,0.15)); + PlayersList.Columns.AddItem(NewFColumnItem(TotalPlaytimeColumnText,0.15)); + + TopPlayers[0].Columns.AddItem(NewFColumnItem("#",0.05)); + TopPlayers[0].Columns.AddItem(NewFColumnItem(PlayerColumnText,0.7)); + TopPlayers[0].Columns.AddItem(NewFColumnItem(TotalPlaytimeColumnText,0.25)); + + TopPlayers[1].Columns.AddItem(NewFColumnItem("#",0.05)); + TopPlayers[1].Columns.AddItem(NewFColumnItem(PlayerColumnText,0.7)); + TopPlayers[1].Columns.AddItem(NewFColumnItem(TotalKillsColumnText,0.25)); + + TopPlayers[2].Columns.AddItem(NewFColumnItem("#",0.05)); + TopPlayers[2].Columns.AddItem(NewFColumnItem(PlayerColumnText,0.7)); + TopPlayers[2].Columns.AddItem(NewFColumnItem(TotalExpColumnText,0.25)); + Super.InitMenu(); } function ShowMenu() @@ -166,10 +226,7 @@ function SelectedRow( KFGUI_ListItem Item, int Row, bool bRight, bool bDblClick defaultproperties { - // TODO: localize Begin Object Class=KFGUI_Button Name=B_ShowStats - ButtonText="Show Stats" - Tooltip="Show the stats of the current players in server" XPosition=0.05 YPosition=0.05 XSize=0.1 @@ -180,8 +237,7 @@ defaultproperties OnClickRight=ButtonClicked End Object Begin Object Class=KFGUI_Button Name=B_ShowTopTime - ButtonText="Top playtime" - Tooltip="Show the top playtime by players in all-time from this server" + ID="Playtime" XPosition=0.35 YPosition=0.05 XSize=0.1 @@ -191,8 +247,7 @@ defaultproperties OnClickRight=ButtonClicked End Object Begin Object Class=KFGUI_Button Name=B_ShowTopKills - ButtonText="Top kills" - Tooltip="Show the top kills by players in all-time from this server" + ID="Kills" XPosition=0.6 YPosition=0.05 XSize=0.1 @@ -202,8 +257,7 @@ defaultproperties OnClickRight=ButtonClicked End Object Begin Object Class=KFGUI_Button Name=B_ShowTopEXP - ButtonText="Top EXP" - Tooltip="Show the top EXP by players in all-time from this server" + ID="Exp" XPosition=0.85 YPosition=0.05 XSize=0.1 @@ -223,34 +277,20 @@ defaultproperties XSize=0.9 YSize=0.85 ID="Pager" - Begin Object Class=KFGUI_ColumnList Name=PlayerList ID="Players" - Columns.Add((Text="Player",Width=0.55)) - Columns.Add((Text="Total Kills",Width=0.15)) - Columns.Add((Text="Total EXP",Width=0.15)) - Columns.Add((Text="Total PlayTime",Width=0.15)) OnSelectedRow=SelectedRow End Object Begin Object Class=KFGUI_ColumnList Name=TopPlaytimes ID="PlayTimes" - Columns.Add((Text="#",Width=0.05)) - Columns.Add((Text="Player",Width=0.7)) - Columns.Add((Text="Total PlayTime",Width=0.25)) OnSelectedRow=SelectedRow End Object Begin Object Class=KFGUI_ColumnList Name=TopKills ID="Kills" - Columns.Add((Text="#",Width=0.05)) - Columns.Add((Text="Player",Width=0.7)) - Columns.Add((Text="Total Kills",Width=0.25)) OnSelectedRow=SelectedRow End Object Begin Object Class=KFGUI_ColumnList Name=TopExp ID="EXP" - Columns.Add((Text="#",Width=0.05)) - Columns.Add((Text="Player",Width=0.7)) - Columns.Add((Text="Total EXP",Width=0.25)) OnSelectedRow=SelectedRow End Object Components.Add(PlayerList)