main menu tab localization
This commit is contained in:
parent
bb9964199f
commit
e76c0ac5db
Binary file not shown.
@ -10,7 +10,7 @@ function InitMenu()
|
||||
|
||||
for( i=0; i<Pages.Length; ++i )
|
||||
{
|
||||
PageSwitcher.AddPage(Pages[i].PageClass,Pages[i].Caption,Pages[i].Hint,B).InitMenu();
|
||||
PageSwitcher.AddPage(Pages[i],B).InitMenu();
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,5 +54,5 @@ defaultproperties
|
||||
YSize=0.73
|
||||
|
||||
Pages.Empty
|
||||
Pages.Add((PageClass=Class'UIP_PerkSelectionLobby',Caption="Perk",Hint="Select and upgrade your perks"))
|
||||
Pages.Add(Class'UIP_PerkSelectionLobby')
|
||||
}
|
@ -23,6 +23,9 @@ var() int IDValue; // Integer ID value.
|
||||
var transient float CompPos[4],InputPos[4];
|
||||
var float TimerRate,TimerCounter;
|
||||
|
||||
var localized string Caption;
|
||||
var localized string Hint;
|
||||
|
||||
var transient KFGUI_Base MouseArea; // Next in recurse line of the mouse pointer focus area.
|
||||
|
||||
var() bool bDisabled,bClickable,bCanFocus;
|
||||
|
@ -9,11 +9,14 @@ var int NumButtons,CurrentPageNum,PageComponentIndex;
|
||||
var array<KFGUI_Button> PageButtons;
|
||||
|
||||
// Remember to call InitMenu() on the newly created page after.
|
||||
final function KFGUI_Base AddPage( class<KFGUI_Base> PageClass, string Caption, string Hint, optional out KFGUI_Button Button )
|
||||
final function KFGUI_Base AddPage( class<KFGUI_Base> PageClass, optional out KFGUI_Button Button )
|
||||
{
|
||||
local KFGUI_Base P;
|
||||
local KFGUI_Base C;
|
||||
local KFGUI_Button B;
|
||||
|
||||
C = new PageClass;
|
||||
|
||||
// Add page.
|
||||
P = new (Self) PageClass;
|
||||
P.Owner = Owner;
|
||||
@ -22,8 +25,8 @@ final function KFGUI_Base AddPage( class<KFGUI_Base> PageClass, string Caption,
|
||||
|
||||
// Add page switch button.
|
||||
B = new (Self) class'KFGUI_Button';
|
||||
B.ButtonText = Caption;
|
||||
B.ToolTip = Hint;
|
||||
B.ButtonText = C.Caption;
|
||||
B.ToolTip = C.Hint;
|
||||
B.OnClickLeft = PageSwitched;
|
||||
B.OnClickRight = PageSwitched;
|
||||
B.IDValue = NumButtons;
|
||||
|
@ -1,12 +1,7 @@
|
||||
Class UI_MidGameMenu extends KFGUI_FloatingWindow;
|
||||
|
||||
struct FPageInfo
|
||||
{
|
||||
var class<KFGUI_Base> PageClass;
|
||||
var string Caption,Hint;
|
||||
};
|
||||
|
||||
var KFGUI_SwitchMenuBar PageSwitcher;
|
||||
var() array<FPageInfo> Pages;
|
||||
var array< class<KFGUI_Base> > Pages;
|
||||
|
||||
var KFGUI_Button AdminButton,SpectateButton;
|
||||
|
||||
@ -30,8 +25,8 @@ function InitMenu()
|
||||
|
||||
for( i=0; i<Pages.Length; ++i )
|
||||
{
|
||||
PageSwitcher.AddPage(Pages[i].PageClass,Pages[i].Caption,Pages[i].Hint,B).InitMenu();
|
||||
if( Pages[i].PageClass==Class'UIP_AdminMenu' )
|
||||
PageSwitcher.AddPage(Pages[i],B).InitMenu();
|
||||
if( Pages[i]==Class'UIP_AdminMenu' )
|
||||
AdminButton = B;
|
||||
}
|
||||
}
|
||||
@ -139,13 +134,13 @@ defaultproperties
|
||||
XSize=0.8
|
||||
YSize=0.8
|
||||
|
||||
Pages.Add((PageClass=Class'UIP_News',Caption="News",Hint="Server news page"))
|
||||
Pages.Add((PageClass=Class'UIP_PerkSelection',Caption="Perk",Hint="Select and upgrade your perks"))
|
||||
Pages.Add((PageClass=Class'UIP_Settings',Caption="Settings",Hint="Show additional ServerExt settings"))
|
||||
Pages.Add((PageClass=Class'UIP_PlayerSpecs',Caption="Stats",Hint="Show all players server stats"))
|
||||
Pages.Add((PageClass=Class'UIP_AdminMenu',Caption="Admin",Hint=""))
|
||||
Pages.Add((PageClass=Class'UIP_About',Caption="About",Hint="About this mod on this server"))
|
||||
Pages.Add((PageClass=Class'UIP_MiniGame',Caption="Minigame",Hint="Play a minigame while at it"))
|
||||
Pages.Add(Class'UIP_News')
|
||||
Pages.Add(Class'UIP_PerkSelection')
|
||||
Pages.Add(Class'UIP_Settings')
|
||||
Pages.Add(Class'UIP_PlayerSpecs')
|
||||
Pages.Add(Class'UIP_AdminMenu')
|
||||
Pages.Add(Class'UIP_About')
|
||||
Pages.Add(Class'UIP_MiniGame')
|
||||
|
||||
Begin Object Class=KFGUI_SwitchMenuBar Name=MultiPager
|
||||
ID="Pager"
|
||||
|
Loading…
Reference in New Issue
Block a user