2017-10-20 02:00:49 +00:00
|
|
|
Class ExtMoviePlayer_Manager extends KFGFxMoviePlayer_Manager;
|
|
|
|
|
|
|
|
var ExtMenu_Gear EGearMenu;
|
2017-10-20 07:02:53 +00:00
|
|
|
var transient KFGUI_Page PerksPage;
|
2017-10-20 02:00:49 +00:00
|
|
|
|
|
|
|
event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
|
|
|
|
{
|
|
|
|
local PlayerController PC;
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
switch (WidgetName)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
case 'gearMenu':
|
|
|
|
PC = GetPC();
|
2020-11-28 20:12:58 +00:00
|
|
|
if (PC.PlayerReplicationInfo.bReadyToPlay && PC.WorldInfo.GRI.bMatchHasBegun)
|
2017-10-20 02:00:49 +00:00
|
|
|
return true;
|
|
|
|
if (EGearMenu == none)
|
|
|
|
{
|
|
|
|
EGearMenu = ExtMenu_Gear(Widget);
|
|
|
|
EGearMenu.InitializeMenu(self);
|
|
|
|
}
|
2020-11-28 20:04:55 +00:00
|
|
|
OnMenuOpen(WidgetPath, EGearMenu);
|
2017-10-20 02:00:49 +00:00
|
|
|
return true;
|
|
|
|
default:
|
|
|
|
return Super.WidgetInitialized(WidgetName,WidgetPath,Widget);
|
|
|
|
}
|
|
|
|
}
|
2020-11-28 21:54:57 +00:00
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
function LaunchMenus(optional bool bForceSkipLobby)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
local GFxWidgetBinding WidgetBinding;
|
|
|
|
local bool bSkippedLobby;
|
|
|
|
|
|
|
|
// Add either the in game party or out of game party widget
|
|
|
|
WidgetBinding.WidgetName = 'partyWidget';
|
|
|
|
bSkippedLobby = bForceSkipLobby || CheckSkipLobby();
|
|
|
|
WidgetBinding.WidgetClass = class'ExtWidget_PartyInGame';
|
|
|
|
ManagerObject.SetBool("backgroundVisible", false);
|
|
|
|
ManagerObject.SetBool("IISMovieVisible", false);
|
2020-11-28 20:12:58 +00:00
|
|
|
if (bSkippedLobby)
|
2017-10-20 02:00:49 +00:00
|
|
|
CurrentBackgroundMovie.Stop();
|
|
|
|
|
|
|
|
WidgetBindings.AddItem(WidgetBinding);
|
|
|
|
|
|
|
|
// Load the platform-specific graphics options menu
|
2020-11-28 20:12:58 +00:00
|
|
|
switch (class'KFGameEngine'.static.GetPlatform())
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
case PLATFORM_PC_DX10:
|
|
|
|
WidgetBinding.WidgetName = 'optionsGraphicsMenu';
|
|
|
|
WidgetBinding.WidgetClass = class'KFGFxOptionsMenu_Graphics_DX10';
|
|
|
|
WidgetBindings.AddItem(WidgetBinding);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
WidgetBinding.WidgetName = 'optionsGraphicsMenu';
|
|
|
|
WidgetBinding.WidgetClass = class'KFGFxOptionsMenu_Graphics';
|
|
|
|
WidgetBindings.AddItem(WidgetBinding);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bSkippedLobby)
|
|
|
|
{
|
|
|
|
LoadWidgets(WidgetPaths);
|
|
|
|
OpenMenu(UI_Start);
|
|
|
|
AllowCloseMenu();
|
|
|
|
}
|
|
|
|
|
|
|
|
// do this stuff in case CheckSkipLobby failed
|
2020-11-28 20:12:58 +00:00
|
|
|
if (bForceSkipLobby)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
bAfterLobby = true;
|
|
|
|
CloseMenus(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
function OpenMenu(byte NewMenuIndex, optional bool bShowWidgets = true)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
local KF2GUIController GUIController;
|
|
|
|
|
|
|
|
GUIController = class'KF2GUIController'.Static.GetGUIController(GetPC());
|
|
|
|
|
|
|
|
Super.OpenMenu(NewMenuIndex, bShowWidgets);
|
|
|
|
|
2020-11-28 20:12:58 +00:00
|
|
|
if (bAfterLobby)
|
2017-10-20 07:02:53 +00:00
|
|
|
return;
|
|
|
|
|
2020-11-28 20:12:58 +00:00
|
|
|
if (NewMenuIndex == UI_Perks)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
PerksPage = GUIController.OpenMenu(class'ExtGUI_PerkSelectionPage');
|
|
|
|
SetMovieCanReceiveInput(false);
|
|
|
|
PerksMenu.ActionScriptVoid("closeContainer");
|
|
|
|
}
|
|
|
|
else GUIController.CloseMenu(class'ExtGUI_PerkSelectionPage');
|
|
|
|
}
|
|
|
|
|
|
|
|
function CloseMenus(optional bool bForceClose=false)
|
|
|
|
{
|
|
|
|
local KF2GUIController GUIController;
|
|
|
|
|
2020-11-28 20:12:58 +00:00
|
|
|
if (PerksPage != None)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
GUIController = class'KF2GUIController'.Static.GetGUIController(GetPC());
|
|
|
|
GUIController.CloseMenu(class'ExtGUI_PerkSelectionPage');
|
|
|
|
}
|
|
|
|
|
|
|
|
Super.CloseMenus(bForceClose);
|
|
|
|
}
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
function OnMenuOpen(name WidgetPath, KFGFxObject_Menu Widget)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
Super.OnMenuOpen(WidgetPath, Widget);
|
|
|
|
|
2020-11-28 20:12:58 +00:00
|
|
|
if (!bAfterLobby && Widget == PerksMenu)
|
2017-10-20 07:02:53 +00:00
|
|
|
PerksMenu.ActionScriptVoid("closeContainer");
|
|
|
|
}
|
|
|
|
|
2017-10-20 02:00:49 +00:00
|
|
|
defaultproperties
|
|
|
|
{
|
2017-10-20 07:02:53 +00:00
|
|
|
InGamePartyWidgetClass=class'ExtWidget_PartyInGame'
|
|
|
|
|
|
|
|
WidgetPaths.Remove("../UI_Widgets/PartyWidget_SWF.swf")
|
|
|
|
WidgetPaths.Add("../UI_Widgets/VersusLobbyWidget_SWF.swf")
|
|
|
|
|
2017-10-20 02:00:49 +00:00
|
|
|
WidgetBindings.Remove((WidgetName="PerksMenu",WidgetClass=class'KFGFxMenu_Perks'))
|
|
|
|
WidgetBindings.Add((WidgetName="PerksMenu",WidgetClass=class'ExtMenu_Perks'))
|
|
|
|
WidgetBindings.Remove((WidgetName="gearMenu",WidgetClass=class'KFGFxMenu_Gear'))
|
|
|
|
WidgetBindings.Add((WidgetName="gearMenu",WidgetClass=class'ExtMenu_Gear'))
|
|
|
|
WidgetBindings.Remove((WidgetName="traderMenu",WidgetClass=class'KFGFxMenu_Trader'))
|
|
|
|
WidgetBindings.Add((WidgetName="traderMenu",WidgetClass=class'ExtMenu_Trader'))
|
2017-10-20 07:02:53 +00:00
|
|
|
//WidgetBindings.Remove((WidgetName="inventoryMenu",WidgetClass=class'KFGFxMenu_Inventory'))
|
|
|
|
//WidgetBindings.Add((WidgetName="inventoryMenu",WidgetClass=class'ExtMenu_Inventory'))
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|