KF2-Server-Extension/ServerExt/Classes/ExtGUI_PerkSelectionPage.uc
2020-06-26 09:32:40 +03:00

58 lines
1.2 KiB
Ucode

Class ExtGUI_PerkSelectionPage extends UI_MidGameMenu;
function InitMenu()
{
local byte i;
local KFGUI_Button B;
PageSwitcher = KFGUI_SwitchMenuBar(FindComponentID('Pager'));
Super(KFGUI_Page).InitMenu();
for( i=0; i<Pages.Length; ++i )
{
PageSwitcher.AddPage(Pages[i],B).InitMenu();
}
}
function ShowMenu()
{
Super(KFGUI_FloatingWindow).ShowMenu();
}
function PreDraw()
{
local GameViewportClient Viewport;
local ExtMoviePlayer_Manager MovieManager;
Super.PreDraw();
Viewport = LocalPlayer(GetPlayer().Player).ViewportClient;
MovieManager = ExtMoviePlayer_Manager(KFPlayerController(GetPlayer()).MyGFxManager);
if( CaptureMouse() )
{
Viewport.bDisplayHardwareMouseCursor = true;
Viewport.ForceUpdateMouseCursor(true);
MovieManager.SetMovieCanReceiveInput(false);
}
else if( Viewport.bDisplayHardwareMouseCursor )
{
Viewport.bDisplayHardwareMouseCursor = false;
Viewport.ForceUpdateMouseCursor(true);
MovieManager.SetMovieCanReceiveInput(true);
}
}
function UserPressedEsc();
defaultproperties
{
WindowTitle="" // TODO: localize? WTF?
XPosition=0.01
XSize=0.73
YSize=0.73
Pages.Empty
Pages.Add(Class'UIP_PerkSelectionLobby')
}