feat: PlayerStats localization
This commit is contained in:
parent
c907e1b398
commit
9687039933
Binary file not shown.
@ -4,6 +4,7 @@ struct FPageExtraInfo
|
|||||||
{
|
{
|
||||||
var array<UniqueNetId> UserID;
|
var array<UniqueNetId> UserID;
|
||||||
};
|
};
|
||||||
|
|
||||||
var FPageExtraInfo ExtraInfo[3];
|
var FPageExtraInfo ExtraInfo[3];
|
||||||
var KFGUI_ColumnList PlayersList,TopPlayers[3];
|
var KFGUI_ColumnList PlayersList,TopPlayers[3];
|
||||||
var KFGUI_SwitchComponent MultiPager;
|
var KFGUI_SwitchComponent MultiPager;
|
||||||
@ -12,6 +13,31 @@ var byte CurrentPageStatus[3];
|
|||||||
var KFGUI_Button PreviousButton;
|
var KFGUI_Button PreviousButton;
|
||||||
var bool bDownloadingPage;
|
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()
|
function InitMenu()
|
||||||
{
|
{
|
||||||
PreviousButton = KFGUI_Button(FindComponentID('Init'));
|
PreviousButton = KFGUI_Button(FindComponentID('Init'));
|
||||||
@ -21,6 +47,40 @@ function InitMenu()
|
|||||||
TopPlayers[1] = KFGUI_ColumnList(FindComponentID('Kills'));
|
TopPlayers[1] = KFGUI_ColumnList(FindComponentID('Kills'));
|
||||||
TopPlayers[2] = KFGUI_ColumnList(FindComponentID('EXP'));
|
TopPlayers[2] = KFGUI_ColumnList(FindComponentID('EXP'));
|
||||||
MultiPager = KFGUI_SwitchComponent(FindComponentID('Pager'));
|
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();
|
Super.InitMenu();
|
||||||
}
|
}
|
||||||
function ShowMenu()
|
function ShowMenu()
|
||||||
@ -166,10 +226,7 @@ function SelectedRow( KFGUI_ListItem Item, int Row, bool bRight, bool bDblClick
|
|||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
// TODO: localize
|
|
||||||
Begin Object Class=KFGUI_Button Name=B_ShowStats
|
Begin Object Class=KFGUI_Button Name=B_ShowStats
|
||||||
ButtonText="Show Stats"
|
|
||||||
Tooltip="Show the stats of the current players in server"
|
|
||||||
XPosition=0.05
|
XPosition=0.05
|
||||||
YPosition=0.05
|
YPosition=0.05
|
||||||
XSize=0.1
|
XSize=0.1
|
||||||
@ -180,8 +237,7 @@ defaultproperties
|
|||||||
OnClickRight=ButtonClicked
|
OnClickRight=ButtonClicked
|
||||||
End Object
|
End Object
|
||||||
Begin Object Class=KFGUI_Button Name=B_ShowTopTime
|
Begin Object Class=KFGUI_Button Name=B_ShowTopTime
|
||||||
ButtonText="Top playtime"
|
ID="Playtime"
|
||||||
Tooltip="Show the top playtime by players in all-time from this server"
|
|
||||||
XPosition=0.35
|
XPosition=0.35
|
||||||
YPosition=0.05
|
YPosition=0.05
|
||||||
XSize=0.1
|
XSize=0.1
|
||||||
@ -191,8 +247,7 @@ defaultproperties
|
|||||||
OnClickRight=ButtonClicked
|
OnClickRight=ButtonClicked
|
||||||
End Object
|
End Object
|
||||||
Begin Object Class=KFGUI_Button Name=B_ShowTopKills
|
Begin Object Class=KFGUI_Button Name=B_ShowTopKills
|
||||||
ButtonText="Top kills"
|
ID="Kills"
|
||||||
Tooltip="Show the top kills by players in all-time from this server"
|
|
||||||
XPosition=0.6
|
XPosition=0.6
|
||||||
YPosition=0.05
|
YPosition=0.05
|
||||||
XSize=0.1
|
XSize=0.1
|
||||||
@ -202,8 +257,7 @@ defaultproperties
|
|||||||
OnClickRight=ButtonClicked
|
OnClickRight=ButtonClicked
|
||||||
End Object
|
End Object
|
||||||
Begin Object Class=KFGUI_Button Name=B_ShowTopEXP
|
Begin Object Class=KFGUI_Button Name=B_ShowTopEXP
|
||||||
ButtonText="Top EXP"
|
ID="Exp"
|
||||||
Tooltip="Show the top EXP by players in all-time from this server"
|
|
||||||
XPosition=0.85
|
XPosition=0.85
|
||||||
YPosition=0.05
|
YPosition=0.05
|
||||||
XSize=0.1
|
XSize=0.1
|
||||||
@ -223,34 +277,20 @@ defaultproperties
|
|||||||
XSize=0.9
|
XSize=0.9
|
||||||
YSize=0.85
|
YSize=0.85
|
||||||
ID="Pager"
|
ID="Pager"
|
||||||
|
|
||||||
Begin Object Class=KFGUI_ColumnList Name=PlayerList
|
Begin Object Class=KFGUI_ColumnList Name=PlayerList
|
||||||
ID="Players"
|
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
|
OnSelectedRow=SelectedRow
|
||||||
End Object
|
End Object
|
||||||
Begin Object Class=KFGUI_ColumnList Name=TopPlaytimes
|
Begin Object Class=KFGUI_ColumnList Name=TopPlaytimes
|
||||||
ID="PlayTimes"
|
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
|
OnSelectedRow=SelectedRow
|
||||||
End Object
|
End Object
|
||||||
Begin Object Class=KFGUI_ColumnList Name=TopKills
|
Begin Object Class=KFGUI_ColumnList Name=TopKills
|
||||||
ID="Kills"
|
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
|
OnSelectedRow=SelectedRow
|
||||||
End Object
|
End Object
|
||||||
Begin Object Class=KFGUI_ColumnList Name=TopExp
|
Begin Object Class=KFGUI_ColumnList Name=TopExp
|
||||||
ID="EXP"
|
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
|
OnSelectedRow=SelectedRow
|
||||||
End Object
|
End Object
|
||||||
Components.Add(PlayerList)
|
Components.Add(PlayerList)
|
||||||
|
Loading…
Reference in New Issue
Block a user