feat: Update ServerBrowser & Main Menu Lua (#285)
* feat: add server browser [draft] * fix: load custom lui using require * feat: Server Browser + Main Menu tweaks * feat: Add Create a Class button to Server Browser * fix: resolve empty string * Fix build ---------
This commit is contained in:
parent
f183af3ecd
commit
2d588e26ba
186
data/cdata/ui_scripts/MainMenu/CPMainMenu.lua
Normal file
186
data/cdata/ui_scripts/MainMenu/CPMainMenu.lua
Normal file
@ -0,0 +1,186 @@
|
||||
local f0_local0 = function ( f1_arg0, f1_arg1 )
|
||||
Engine.Exec( "xblive_privatematch 0" )
|
||||
utils.cp.AliensUtils.AliensRunConfig( f1_arg1.controller )
|
||||
LUI.FlowManager.RequestAddMenu( "SystemLinkMenu", false, f1_arg1.controller, false, {}, true )
|
||||
end
|
||||
|
||||
local f0_local1 = function ( f2_arg0, f2_arg1 )
|
||||
print ("Are we running?!?")
|
||||
f0_local0( f2_arg0, f2_arg1 )
|
||||
end
|
||||
|
||||
local f0_local2 = function ( f3_arg0, f3_arg1 )
|
||||
Engine.Exec( MPConfig.default_xboxlive, f3_arg1.controller )
|
||||
Engine.SetDvarBool( "xblive_privatematch", true )
|
||||
SetIsAliensSolo( true )
|
||||
Engine.SetDvarInt( "party_maxplayers", 1 )
|
||||
Engine.Exec( "xstartprivatematch" )
|
||||
LUI.FlowManager.RequestAddMenu( "CPPrivateMatchMenu", false, f3_arg1.controller, false, {
|
||||
showPlayNowButton = true,
|
||||
isPublicMatch = false
|
||||
} )
|
||||
end
|
||||
|
||||
local f0_local3 = function ( f4_arg0, f4_arg1 )
|
||||
Engine.Exec( MPConfig.default_xboxlive, f4_arg1.controller )
|
||||
Engine.SetDvarBool( "xblive_privatematch", true )
|
||||
SetIsAliensSolo( false )
|
||||
Engine.Exec( "xstartprivatematch" )
|
||||
LUI.FlowManager.RequestAddMenu( "CPPrivateMatchMenu", false, f4_arg1.controller, false, {
|
||||
showPlayNowButton = true,
|
||||
isPublicMatch = false
|
||||
} )
|
||||
end
|
||||
|
||||
local f0_local4 = function ( f5_arg0, f5_arg1, f5_arg2 )
|
||||
assert( f5_arg0.PublicMatch )
|
||||
assert( f5_arg0.SoloMatch )
|
||||
assert( f5_arg0.CustomMatch )
|
||||
local f5_local0 = LUI.DataSourceInGlobalModel.new( "frontEnd.lobby.areWeGameHost" )
|
||||
local f5_local1 = DataSources.frontEnd.lobby.memberCount
|
||||
local f5_local2 = function ()
|
||||
return Lobby.IsInPrivateParty() and not Lobby.IsPrivatePartyHost()
|
||||
end
|
||||
|
||||
local f5_local3 = function ()
|
||||
local f7_local0 = f5_local2()
|
||||
f5_arg0.PublicMatch:SetButtonDisabled( f7_local0 )
|
||||
f5_arg0.CustomMatch:SetButtonDisabled( f7_local0 )
|
||||
end
|
||||
|
||||
f5_arg0:SubscribeToModel( f5_local0:GetModel( f5_arg1 ), f5_local3 )
|
||||
f5_arg0:SubscribeToModel( f5_local1:GetModel( f5_arg1 ), f5_local3 )
|
||||
f5_arg0:SubscribeToModel( DataSources.frontEnd.lobby.isSolo:GetModel( f5_arg1 ), function ()
|
||||
local f8_local0 = DataSources.frontEnd.lobby.isSolo:GetValue( f5_arg1 )
|
||||
if f8_local0 ~= nil then
|
||||
f5_arg0.SoloMatch:SetButtonDisabled( not f8_local0 )
|
||||
end
|
||||
end )
|
||||
f5_arg0.PublicMatch:addEventHandler( "button_action", f0_local1 )
|
||||
f5_arg0.SoloMatch:addEventHandler( "button_action", f0_local2 )
|
||||
f5_arg0.Loadout:addEventHandler( "button_action", function ( f9_arg0, f9_arg1 )
|
||||
LUI.FlowManager.RequestAddMenu( "CPLoadoutMenu", true, f9_arg1.controller )
|
||||
end )
|
||||
f5_arg0.Barracks:addEventHandler( "button_action", function ( f10_arg0, f10_arg1 )
|
||||
LUI.FlowManager.RequestAddMenu( "Headquarters", true, f10_arg1.controller )
|
||||
end )
|
||||
f5_arg0.Armory:addEventHandler( "button_action", function ( f11_arg0, f11_arg1 )
|
||||
if not Engine.IsUserAGuest( f11_arg1.controller ) then
|
||||
ACTIONS.OpenMenu( "Armory", true, f11_arg1.controller )
|
||||
end
|
||||
end )
|
||||
f5_arg0.CustomMatch:addEventHandler( "button_action", f0_local3 )
|
||||
f5_arg0.ContractsButton:addEventHandler( "button_action", function ( f12_arg0, f12_arg1 )
|
||||
ACTIONS.OpenMenu( "ContractMenu", true, f12_arg1.controller or f5_arg1 )
|
||||
end )
|
||||
end
|
||||
|
||||
function CPMainMenuButtons( menu, controller )
|
||||
local VNavigator = LUI.UIVerticalNavigator.new()
|
||||
VNavigator:SetAnchorsAndPosition( 0, 1, 0, 1, 0, 500 * _1080p, 0, 400 * _1080p )
|
||||
VNavigator.id = "CPMainMenuButtons"
|
||||
local f14_local1 = controller and controller.controllerIndex
|
||||
if not f14_local1 and not Engine.InFrontend() then
|
||||
f14_local1 = VNavigator:getRootController()
|
||||
end
|
||||
assert( f14_local1 )
|
||||
local f14_local2 = VNavigator
|
||||
local ButtonDescription = nil
|
||||
|
||||
ButtonDescription = MenuBuilder.BuildRegisteredType( "ButtonDescriptionText", {
|
||||
controllerIndex = f14_local1
|
||||
} )
|
||||
ButtonDescription.id = "ButtonDescription"
|
||||
ButtonDescription:SetRGBFromTable( SWATCHES.genericButton.textDisabled, 0 )
|
||||
ButtonDescription.Description:SetRight( _1080p * 415, 0 )
|
||||
ButtonDescription:SetAnchorsAndPosition( 0, 0, 0, 1, 0, 0, _1080p * 336, _1080p * 394 )
|
||||
VNavigator:addElement( ButtonDescription )
|
||||
VNavigator.ButtonDescription = ButtonDescription
|
||||
|
||||
local PublicMatch = nil
|
||||
|
||||
PublicMatch = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f14_local1
|
||||
} )
|
||||
PublicMatch.id = "PublicMatch"
|
||||
PublicMatch.buttonDescription = "Browse for Custom Servers"
|
||||
PublicMatch.Text:setText( ToUpperCase( "Server Browser" ), 0 )
|
||||
PublicMatch:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 340, 0, _1080p * 30 )
|
||||
VNavigator:addElement( PublicMatch )
|
||||
VNavigator.PublicMatch = PublicMatch
|
||||
|
||||
local SoloMatch = nil
|
||||
|
||||
SoloMatch = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f14_local1
|
||||
} )
|
||||
SoloMatch.id = "SoloMatch"
|
||||
SoloMatch.buttonDescription = Engine.Localize( "LUA_MENU_ZM_SOLO_MATCH_DESC" )
|
||||
SoloMatch.Text:setText( ToUpperCase( Engine.Localize( "LUA_MENU_SOLO_MATCH_CAPS" ) ), 0 )
|
||||
SoloMatch:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 340, _1080p * 40, _1080p * 70 )
|
||||
VNavigator:addElement( SoloMatch )
|
||||
VNavigator.SoloMatch = SoloMatch
|
||||
|
||||
local CustomMatch = nil
|
||||
|
||||
CustomMatch = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f14_local1
|
||||
} )
|
||||
CustomMatch.id = "CustomMatch"
|
||||
CustomMatch.buttonDescription = Engine.Localize( "LUA_MENU_ZM_CUSTOM_MATCH_DESC" )
|
||||
CustomMatch.Text:setText( ToUpperCase( Engine.Localize( "LUA_MENU_CUSTOM_GAME_CAPS" ) ), 0 )
|
||||
CustomMatch:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 340, _1080p * 80, _1080p * 110 )
|
||||
VNavigator:addElement( CustomMatch )
|
||||
VNavigator.CustomMatch = CustomMatch
|
||||
|
||||
local Loadout = nil
|
||||
|
||||
Loadout = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f14_local1
|
||||
} )
|
||||
Loadout.id = "Loadout"
|
||||
Loadout.buttonDescription = Engine.Localize( "LUA_MENU_ZM_LOADOUT_DESC" )
|
||||
Loadout.Text:setText( Engine.Localize( "LUA_MENU_ZM_LOADOUT_CAPS" ), 0 )
|
||||
Loadout:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 340, _1080p * 120, _1080p * 150 )
|
||||
VNavigator:addElement( Loadout )
|
||||
VNavigator.Loadout = Loadout
|
||||
|
||||
local Barracks = nil
|
||||
|
||||
Barracks = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f14_local1
|
||||
} )
|
||||
Barracks.id = "Barracks"
|
||||
Barracks.buttonDescription = Engine.Localize( "LUA_MENU_ZM_BARRACKS_DESC" )
|
||||
Barracks.Text:setText( ToUpperCase( Engine.Localize( "LUA_MENU_ZM_BARRACKS_CAPS" ) ), 0 )
|
||||
Barracks:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 340, _1080p * 160, _1080p * 190 )
|
||||
VNavigator:addElement( Barracks )
|
||||
VNavigator.Barracks = Barracks
|
||||
|
||||
local Armory = nil
|
||||
|
||||
Armory = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f14_local1
|
||||
} )
|
||||
Armory.id = "Armory"
|
||||
Armory.buttonDescription = Engine.Localize( "LUA_MENU_ZM_SURVIVAL_DEPOT_DESC" )
|
||||
Armory.Text:setText( ToUpperCase( Engine.Localize( "LUA_MENU_ZM_SURVIVAL_DEPOT" ) ), 0 )
|
||||
Armory:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 340, _1080p * 200, _1080p * 230 )
|
||||
VNavigator:addElement( Armory )
|
||||
VNavigator.Armory = Armory
|
||||
|
||||
local ContractsButton = nil
|
||||
|
||||
ContractsButton = MenuBuilder.BuildRegisteredType( "ContractsButtonCP", {
|
||||
controllerIndex = f14_local1
|
||||
} )
|
||||
ContractsButton.id = "ContractsButton"
|
||||
ContractsButton:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 340, _1080p * 240, _1080p * 300 )
|
||||
VNavigator:addElement( ContractsButton )
|
||||
VNavigator.ContractsButton = ContractsButton
|
||||
|
||||
f0_local4( VNavigator, f14_local1, controller )
|
||||
return VNavigator
|
||||
end
|
||||
|
||||
MenuBuilder.m_types["CPMainMenuButtons"] = CPMainMenuButtons
|
498
data/cdata/ui_scripts/MainMenu/MPMainMenu.lua
Normal file
498
data/cdata/ui_scripts/MainMenu/MPMainMenu.lua
Normal file
@ -0,0 +1,498 @@
|
||||
local f0_local0 = function ()
|
||||
if Engine.SplitscreenPlayerCount() > 0 then
|
||||
local f1_local0 = Engine.GetFirstActiveController()
|
||||
if f1_local0 and Engine.IsUserSignedIn( f1_local0 ) then
|
||||
Engine.PLMRefreshData()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local f0_local1 = function ( f2_arg0, f2_arg1 )
|
||||
local f2_local0 = Engine.HasActiveLocalClient( f2_arg1.controller )
|
||||
if f2_local0 then
|
||||
f2_local0 = not Engine.IsActiveLocalClientPrimary( f2_arg1.controller )
|
||||
end
|
||||
if f2_local0 then
|
||||
local f2_local1 = LUI.FlowManager.GetScopedData( f2_arg0 )
|
||||
if f2_local1 and f2_local1.focusedPage and f2_local1.focusedPage > 2 then
|
||||
f2_arg0:dispatchEventToRoot( {
|
||||
name = "lobby_slide_left",
|
||||
immediate = true
|
||||
} )
|
||||
end
|
||||
elseif Lobby.IsNotAloneInPrivateParty() then
|
||||
LUI.FlowManager.RequestPopupMenu( f2_arg0, "LeaveCommonMPMainMenuPopup", true, f2_arg1.controller, false, {
|
||||
menu = f2_arg0
|
||||
} )
|
||||
else
|
||||
Lobby.LeaveCommonMPMainMenu( f2_arg0, f2_arg1.controller )
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
local f0_local2 = function ( f3_arg0, f3_arg1 )
|
||||
local f3_local0 = Engine.GetFirstActiveController()
|
||||
if Engine.GetDvarBool( "xblive_competitionmatch" ) then
|
||||
Engine.SetDvarBool( "xblive_competitionmatch", false )
|
||||
Engine.Exec( "set remove_mlg_rules 1" )
|
||||
end
|
||||
Engine.ExecNow( MPConfig.default_xboxlive, f3_local0 )
|
||||
end
|
||||
|
||||
local f0_local3 = function ( f4_arg0, f4_arg1 )
|
||||
if Lobby.IsInviteOnly( f4_arg1 ) then
|
||||
f4_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_LOBBY_ALLOW_JOIN" ),
|
||||
button_ref = "button_alt1",
|
||||
side = "left",
|
||||
clickable = true
|
||||
} )
|
||||
else
|
||||
f4_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_LOBBY_BLOCK_JOIN" ),
|
||||
button_ref = "button_alt1",
|
||||
side = "left",
|
||||
clickable = true
|
||||
} )
|
||||
end
|
||||
end
|
||||
|
||||
local f0_local4 = function ( f5_arg0 )
|
||||
local f5_local0 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "postShipFlags", 3 )
|
||||
if f5_local0 == nil or f5_local0 == false then
|
||||
local f5_local1 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypePreferences", 1, "head" )
|
||||
local f5_local2 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypePreferences", 3, "head" )
|
||||
local f5_local3 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypePreferences", 1, "body" )
|
||||
local f5_local4 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypePreferences", 3, "body" )
|
||||
if f5_local1 ~= nil and f5_local1 == "head_160" then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypePreferences", 1, "head", "head_287" )
|
||||
end
|
||||
if f5_local2 ~= nil and f5_local2 == "head_167" then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypePreferences", 3, "head", "head_294" )
|
||||
end
|
||||
if f5_local3 ~= nil and f5_local3 == "body_90" then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypePreferences", 1, "body", "body_217" )
|
||||
end
|
||||
if f5_local4 ~= nil and f5_local4 == "body_97" then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypePreferences", 3, "body", "body_224" )
|
||||
end
|
||||
local f5_local5 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "head" )
|
||||
local f5_local6 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "body" )
|
||||
if f5_local5 ~= nil and f5_local5 == 160 then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "head", 287 )
|
||||
end
|
||||
if f5_local5 ~= nil and f5_local5 == 167 then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "head", 294 )
|
||||
end
|
||||
if f5_local6 ~= nil and f5_local6 == 90 then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "body", 217 )
|
||||
end
|
||||
if f5_local6 ~= nil and f5_local6 == 97 then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "body", 224 )
|
||||
end
|
||||
local f5_local7 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "archetypePreferences", 1, "head" )
|
||||
local f5_local8 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "archetypePreferences", 3, "head" )
|
||||
local f5_local9 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "archetypePreferences", 1, "body" )
|
||||
local f5_local10 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "archetypePreferences", 3, "body" )
|
||||
if f5_local7 ~= nil and f5_local7 == "head_160" then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "archetypePreferences", 1, "head", "head_287" )
|
||||
end
|
||||
if f5_local8 ~= nil and f5_local8 == "head_167" then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "archetypePreferences", 3, "head", "head_294" )
|
||||
end
|
||||
if f5_local9 ~= nil and f5_local9 == "body_90" then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "archetypePreferences", 1, "body", "body_217" )
|
||||
end
|
||||
if f5_local10 ~= nil and f5_local10 == "body_97" then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "archetypePreferences", 3, "body", "body_224" )
|
||||
end
|
||||
local f5_local11 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "head" )
|
||||
local f5_local12 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "body" )
|
||||
if f5_local11 ~= nil and f5_local11 == 160 then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "head", 287 )
|
||||
end
|
||||
if f5_local11 ~= nil and f5_local11 == 167 then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "head", 294 )
|
||||
end
|
||||
if f5_local12 ~= nil and f5_local12 == 90 then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "body", 217 )
|
||||
end
|
||||
if f5_local12 ~= nil and f5_local12 == 97 then
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.PrivateLoadouts, "squadMembers", "body", 224 )
|
||||
end
|
||||
local f5_local13 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "head" )
|
||||
local f5_local14 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "body" )
|
||||
local f5_local15 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetypeSuper" )
|
||||
local f5_local16 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.RankedLoadouts, "squadMembers", "archetype" )
|
||||
if f5_local13 ~= nil and f5_local14 ~= nil then
|
||||
FrontEndScene.SetCharacterModelsByIndex( FrontEndScene.ClientCharacters.Self, f5_local14, f5_local13 )
|
||||
end
|
||||
if f5_local15 ~= nil and f5_local16 ~= nil then
|
||||
FrontEndScene.SetWeaponForSuper( FrontEndScene.ClientCharacters.Self, f5_local15, f5_local16 )
|
||||
FrontEndScene.PlayIdleForSuper( FrontEndScene.ClientCharacters.Self, f5_local15, f5_local16 )
|
||||
end
|
||||
Engine.SetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "postShipFlags", 3, true )
|
||||
Engine.ExecNow( "uploadstats", f5_arg0 )
|
||||
end
|
||||
end
|
||||
|
||||
local f0_local5 = function ( f6_arg0 )
|
||||
f0_local4( f6_arg0 )
|
||||
end
|
||||
|
||||
local f0_local6 = function ( f7_arg0, f7_arg1 )
|
||||
Engine.SetDvarString( "ui_version_show", "0" )
|
||||
Engine.SetDvarBool( "ui_onlineRequired", false )
|
||||
FrontEndScene.CurrentMissionTeam = MissionDirector.InvalidTeamID
|
||||
FrontEndScene.SetScene( "mp_main" )
|
||||
local f7_local0 = f7_arg1.controller
|
||||
if not f7_local0 then
|
||||
f7_local0 = Engine.GetFirstActiveController()
|
||||
end
|
||||
CheckTURequirement( f7_arg0, f7_local0 )
|
||||
local f7_local1 = DataSources.alwaysLoaded.playerData.MP.rankedloadouts.squadMembers
|
||||
local f7_local2 = Cac.GetRigFrontEndProfileAnim( f7_local1.archetype:GetValue( f7_local0 ) )
|
||||
FrontEndScene.SetCharacterModelsByIndex( FrontEndScene.ClientCharacters.Profile, f7_local1.body:GetValue( f7_local0 ), f7_local1.head:GetValue( f7_local0 ) )
|
||||
ClientCharacter.SetCharacterWeapons( FrontEndScene.ClientCharacters.Profile, nil )
|
||||
ClientCharacter.PlayCharacterAnim( FrontEndScene.ClientCharacters.Profile, f7_local2 )
|
||||
ClientCharacter.SetCharacterVisible( FrontEndScene.ClientCharacters.Profile, true )
|
||||
ClientWeapon.SetWeaponIsViewModel( 0, true )
|
||||
ClientWeapon.SetWeaponVisible( 0, false )
|
||||
f0_local2( f7_arg0, f7_arg1 )
|
||||
if Engine.GetDvarBool( "enable_unlock_sync" ) then
|
||||
local f7_local3 = {}
|
||||
for f7_local7, f7_local8 in pairs( AAR.UnlockTypes ) do
|
||||
table.insert( f7_local3, f7_local8 )
|
||||
end
|
||||
Rewards.SyncUnlocks( f7_local0, f7_local3, #f7_local3 )
|
||||
end
|
||||
if not Lobby.IsInPrivateParty() then
|
||||
Engine.ExecNow( "xstartprivateparty", f7_arg1.controller )
|
||||
end
|
||||
f7_arg0:registerEventHandler( "not_below_blocking_fence", function ( element, event )
|
||||
Engine.SetDvarBool( "cg_mlg_gamebattles_match", false )
|
||||
if not MLG.IsGameBattleMatch() then
|
||||
Lobby.WakePrivateParty( f7_local0 )
|
||||
end
|
||||
end )
|
||||
Lobby.SetPartyUIRoot( PartyUIRoot.MAIN_MENU )
|
||||
f7_arg0.nextLocation = CRM.locations.MP_MOTD
|
||||
CRM.OpenNextCRMWindow( f7_arg0 )
|
||||
f7_arg0:addEventHandler( "gain_focus", CRM.OpenNextCRMWindow )
|
||||
f7_arg0:addEventHandler( "restore_focus", CRM.OpenNextCRMWindow )
|
||||
end
|
||||
|
||||
local f0_local7 = function ( f9_arg0, f9_arg1, f9_arg2 )
|
||||
Engine.SetDvarBool( "onlinegame", true )
|
||||
if MLG.GetGameBattleMatchId( f9_arg1 ) == GAMEBATTLES.INVALID_MATCH_ID then
|
||||
Engine.SetDvarBool( "xblive_privatematch", false )
|
||||
end
|
||||
end
|
||||
|
||||
local f0_local8 = function ( f10_arg0, f10_arg1, f10_arg2 )
|
||||
if GAMEBATTLES.ScheduleRefreshRequest then
|
||||
GAMEBATTLES.ScheduleRefreshRequest = false
|
||||
OpenGameBattlesLobby( f10_arg1 )
|
||||
else
|
||||
local f10_local0 = GAMEBATTLES.GetCurrentMatch( f10_arg1 )
|
||||
if f10_local0 ~= nil then
|
||||
if GAMEBATTLES.MatchForfeitWinningTeamIndex ~= 0 then
|
||||
GAMEBATTLES.ShowMatchForfeitPopup( f10_arg1, f10_local0, GAMEBATTLES.MatchForfeitWinningTeamIndex )
|
||||
GAMEBATTLES.MatchForfeitWinningTeamIndex = 0
|
||||
else
|
||||
local f10_local1, f10_local2 = GAMEBATTLES.GetMatchProgressInfo( f10_local0 )
|
||||
if f10_local2 then
|
||||
local f10_local3, f10_local4, f10_local5 = GAMEBATTLES.GetMatchVictoryInfo( f10_local0 )
|
||||
if not f10_local5 then
|
||||
LUI.FlowManager.RequestPopupMenu( f10_arg0, "MLGGamebattlesMatchResultsPopup", false, f10_arg1, false, {
|
||||
controllerIndex = f10_arg1,
|
||||
gbMatch = f10_local0,
|
||||
alliesWins = f10_local3,
|
||||
axisWins = f10_local4
|
||||
} )
|
||||
end
|
||||
else
|
||||
local f10_local3 = MLG.GetGameBattleDSAcquisitionState( f10_arg1 )
|
||||
if f10_local3 == GAMEBATTLES.MLG_DS_ACQUISITION_STATE.COULD_NOT_ACQUIRE or f10_local3 == GAMEBATTLES.MLG_DS_ACQUISITION_STATE.ACQUISITION_ERROR then
|
||||
MLG.ResetGameBattleDSAcquisitionState()
|
||||
LUI.FlowManager.RequestPopupMenu( f10_arg0, "MLGGamebattlesMatchCancelledPopup", false, f10_arg1, false, {
|
||||
matchID = f10_local0.matchId
|
||||
} )
|
||||
end
|
||||
end
|
||||
end
|
||||
MLG.ResetGameBattleMatchId( f10_arg1 )
|
||||
end
|
||||
end
|
||||
assert( f10_arg0.bindButton )
|
||||
f10_arg0.isSignInMenu = true
|
||||
f10_arg0.bindButton:addEventHandler( "button_secondary", f0_local1 )
|
||||
f10_arg0:addEventHandler( "menu_create", f0_local6 )
|
||||
if not CONDITIONS.IsGameBattlesAllowed() then
|
||||
local f10_local0, f10_local1, f10_local2, f10_local3 = f10_arg0.ButtonDescription:getLocalRect()
|
||||
local f10_local4 = f10_arg0.MPMainMenuButtons.buttonSpacing
|
||||
f10_arg0.ButtonDescription:SetTop( f10_local1 - f10_local4 )
|
||||
f10_arg0.ButtonDescription:SetBottom( f10_local3 - f10_local4 )
|
||||
end
|
||||
if false == CODTV.IsCODTVEnabled() then
|
||||
local f10_local0, f10_local1, f10_local2, f10_local3 = f10_arg0.ButtonDescription:getLocalRect()
|
||||
local f10_local4 = f10_arg0.MPMainMenuButtons.buttonSpacing
|
||||
f10_arg0.ButtonDescription:SetTop( f10_local1 - f10_local4 )
|
||||
f10_arg0.ButtonDescription:SetBottom( f10_local3 - f10_local4 )
|
||||
end
|
||||
if Engine.GetDvarFloat( "r_filmGrainAtten" ) == 1 then
|
||||
Engine.SetDvarFloat( "r_filmGrainAtten", 0.25 )
|
||||
Engine.ExecNow( "profile_setFilmGrain " .. tostring( 0.25 ), f10_arg1 )
|
||||
end
|
||||
local f10_local0 = Lobby.GetNATType()
|
||||
if f10_local0 then
|
||||
if f10_local0 == "NETWORK_STRICT" and false == Engine.GetDvarBool( "strict_nat_warning_viewed" ) then
|
||||
LUI.FlowManager.RequestPopupMenu( f10_arg0, "strict_nat_warning", true, f10_arg1, false, data )
|
||||
Engine.SetDvarBool( "strict_nat_warning_viewed", true )
|
||||
end
|
||||
f10_arg0:processEvent( {
|
||||
name = "add_button_helper_text",
|
||||
button_ref = "nat",
|
||||
helper_text = Engine.Localize( "NETWORK_YOURNATTYPE", f10_local0 ),
|
||||
side = "right",
|
||||
clickable = false
|
||||
} )
|
||||
end
|
||||
Engine.SetDvarInt( "lui_mc_numGamesFinishedInLobby", 0 )
|
||||
MissionDirector.PlayTeamMusic()
|
||||
Engine.StopMenuVideo()
|
||||
local f10_local1 = LUI.FlowManager.GetScopedData( f10_arg0 )
|
||||
if CONDITIONS.IsTrialLicense() and not f10_local1.trialPopupShown then
|
||||
f10_local1.trialPopupShown = true
|
||||
LUI.FlowManager.RequestPopupMenu( f10_arg0, "TrialFullWindow", true, f10_arg1, false )
|
||||
end
|
||||
f10_arg0:addElement( Lobby.GetMPMapMaterialStreamer() )
|
||||
f0_local5( f10_arg1 )
|
||||
end
|
||||
|
||||
function MPMainMenu( menu, controller )
|
||||
local self = LUI.UIHorizontalNavigator.new()
|
||||
self.id = "MPMainMenu"
|
||||
local f11_local1 = controller and controller.controllerIndex
|
||||
if not f11_local1 and not Engine.InFrontend() then
|
||||
f11_local1 = self:getRootController()
|
||||
end
|
||||
assert( f11_local1 )
|
||||
f0_local7( self, f11_local1, controller )
|
||||
self:playSound( "menu_open" )
|
||||
local f11_local2 = self
|
||||
local HelperBar = nil
|
||||
|
||||
HelperBar = MenuBuilder.BuildRegisteredType( "ButtonHelperBar", {
|
||||
controllerIndex = f11_local1
|
||||
} )
|
||||
HelperBar.id = "HelperBar"
|
||||
HelperBar:SetAnchorsAndPosition( 0, 0, 1, 0, 0, 0, _1080p * -85, 0 )
|
||||
self:addElement( HelperBar )
|
||||
self.HelperBar = HelperBar
|
||||
|
||||
local ButtonDescription = nil
|
||||
|
||||
ButtonDescription = MenuBuilder.BuildRegisteredType( "ButtonDescriptionText", {
|
||||
controllerIndex = f11_local1
|
||||
} )
|
||||
ButtonDescription.id = "ButtonDescription"
|
||||
ButtonDescription.Description:SetRight( _1080p * 415, 0 )
|
||||
ButtonDescription:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 645, _1080p * 554, _1080p * 654 )
|
||||
self:addElement( ButtonDescription )
|
||||
self.ButtonDescription = ButtonDescription
|
||||
|
||||
local SocialFeed = nil
|
||||
|
||||
SocialFeed = MenuBuilder.BuildRegisteredType( "SocialFeed", {
|
||||
controllerIndex = f11_local1
|
||||
} )
|
||||
SocialFeed.id = "SocialFeed"
|
||||
SocialFeed:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 1920, _1080p * 965, _1080p * 995 )
|
||||
self:addElement( SocialFeed )
|
||||
self.SocialFeed = SocialFeed
|
||||
|
||||
local MPMainMenuButtons = nil
|
||||
|
||||
MPMainMenuButtons = MenuBuilder.BuildRegisteredType( "MPMainMenuButtons", {
|
||||
controllerIndex = f11_local1
|
||||
} )
|
||||
MPMainMenuButtons.id = "MPMainMenuButtons"
|
||||
MPMainMenuButtons:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 630, _1080p * 360, _1080p * 564 )
|
||||
self:addElement( MPMainMenuButtons )
|
||||
self.MPMainMenuButtons = MPMainMenuButtons
|
||||
|
||||
local LobbyMembers = nil
|
||||
|
||||
LobbyMembers = MenuBuilder.BuildRegisteredType( "LobbyMembers", {
|
||||
controllerIndex = f11_local1
|
||||
} )
|
||||
LobbyMembers.id = "LobbyMembers"
|
||||
LobbyMembers:SetAnchorsAndPosition( 1, 0, 0, 1, _1080p * -700, 0, _1080p * 273, _1080p * 917 )
|
||||
self:addElement( LobbyMembers )
|
||||
self.LobbyMembers = LobbyMembers
|
||||
|
||||
local CODLogo = nil
|
||||
|
||||
CODLogo = LUI.UIImage.new()
|
||||
CODLogo.id = "CODLogo"
|
||||
CODLogo:setImage( RegisterMaterial( "cod_logo" ), 0 )
|
||||
CODLogo:SetAnchorsAndPosition( 0, 0, 0, 0, _1080p * 108, _1080p * -1272, _1080p * 120, _1080p * -825 )
|
||||
self:addElement( CODLogo )
|
||||
self.CODLogo = CODLogo
|
||||
|
||||
self.addButtonHelperFunction = function ( f12_arg0, f12_arg1 )
|
||||
f12_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_SELECT" ),
|
||||
button_ref = "button_primary",
|
||||
side = "left",
|
||||
clickable = true
|
||||
} )
|
||||
f12_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "MENU_BACK" ),
|
||||
button_ref = "button_secondary",
|
||||
side = "left",
|
||||
priority = 1,
|
||||
clickable = true
|
||||
} )
|
||||
f12_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_OPTIONS_CAPS" ),
|
||||
button_ref = "button_start",
|
||||
side = "left",
|
||||
priority = 4,
|
||||
clickable = true
|
||||
} )
|
||||
end
|
||||
|
||||
self:addEventHandler( "menu_create", self.addButtonHelperFunction )
|
||||
|
||||
local bindButton = LUI.UIBindButton.new()
|
||||
bindButton.id = "selfBindButton"
|
||||
self:addElement( bindButton )
|
||||
self.bindButton = bindButton
|
||||
|
||||
self.bindButton:addEventHandler( "button_start", function ( f13_arg0, f13_arg1 )
|
||||
ACTIONS.OpenMenu( "OptionsMenu", true, f13_arg1.controller or f11_local1 )
|
||||
end )
|
||||
f0_local8( self, f11_local1, controller )
|
||||
return self
|
||||
end
|
||||
|
||||
MenuBuilder.m_types["MPMainMenu"] = MPMainMenu
|
||||
LUI.FlowManager.RegisterStackPushBehaviour( "MPMainMenu", f0_local0 )
|
||||
-- LockTable( _M )
|
||||
|
||||
--- Menu Buttons ---
|
||||
buttonSpacing = 40
|
||||
buttonPadding = 10
|
||||
f0_local2Buttons = function ( f1_arg0, f1_arg1, f1_arg2 )
|
||||
if 0 < f1_arg2 then
|
||||
local f1_local0, f1_local1, f1_local2, f1_local3 = f1_arg0:getLocalRect()
|
||||
local f1_local4 = f1_local3 - f1_local1
|
||||
f1_arg0:SetTop( f1_local1 - (f1_local4 + f1_arg1) * f1_arg2 )
|
||||
f1_arg0:SetBottom( f1_local3 - (f1_local4 + f1_arg1) * f1_arg2 )
|
||||
end
|
||||
end
|
||||
|
||||
local f0_local3Buttons = function ( f2_arg0, f2_arg1, f2_arg2 )
|
||||
assert( f2_arg0.ConquestButton )
|
||||
local f2_local0 = not CONDITIONS.IsTrialLicense( f2_arg0 )
|
||||
if f2_local0 then
|
||||
assert( f2_arg0.CustomGameButton )
|
||||
end
|
||||
f2_arg0.buttonSpacing = _1080p * buttonSpacing
|
||||
local f2_local1 = function ()
|
||||
return Lobby.IsInPrivateParty() and not Lobby.IsPrivatePartyHost()
|
||||
end
|
||||
|
||||
local f2_local2 = function ()
|
||||
local f4_local0 = f2_local1()
|
||||
f2_arg0.ConquestButton:SetButtonDisabled( f4_local0 )
|
||||
end
|
||||
|
||||
local f2_local3 = LUI.DataSourceInGlobalModel.new( "frontEnd.lobby.areWeGameHost" )
|
||||
local f2_local4 = DataSources.frontEnd.lobby.memberCount
|
||||
f2_arg0:SubscribeToModel( f2_local3:GetModel( f2_arg1 ), f2_local2 )
|
||||
f2_arg0:SubscribeToModel( f2_local4:GetModel( f2_arg1 ), f2_local2 )
|
||||
f2_arg0.ConquestButton:addEventHandler( "button_action", function ( f5_arg0, f5_arg1 )
|
||||
Engine.SetDvarBool( "cg_mlg_gamebattles_match", false )
|
||||
local f5_local0 = function ()
|
||||
LUI.FlowManager.RequestAddMenu( "SystemLinkMenu", false, f5_arg1.controller, false, {}, true )
|
||||
end
|
||||
|
||||
f5_local0()
|
||||
end )
|
||||
if f2_local0 then
|
||||
f2_arg0.CustomGameButton:addEventHandler( "button_action", function ( f8_arg0, f8_arg1 )
|
||||
OpenPrivateMatchLobby( f8_arg1 )
|
||||
end )
|
||||
end
|
||||
|
||||
|
||||
local f2_local5 = _1080p * buttonPadding
|
||||
local f2_local6 = 1
|
||||
|
||||
if f2_arg0.CustomGameButton then
|
||||
f0_local2Buttons( f2_arg0.CustomGameButton, f2_local5, f2_local6 )
|
||||
else
|
||||
f2_local6 = f2_local6 + 1
|
||||
end
|
||||
|
||||
f2_local6 = f2_local6 + 1
|
||||
|
||||
end
|
||||
|
||||
function MPMainMenuButtons( menu, controller )
|
||||
local self = LUI.UIVerticalNavigator.new()
|
||||
self:SetAnchorsAndPosition( 0, 1, 0, 1, 0, 500 * _1080p, 0, 190 * _1080p )
|
||||
self.id = "MPMainMenuButtons"
|
||||
local f11_local1 = controller and controller.controllerIndex
|
||||
if not f11_local1 and not Engine.InFrontend() then
|
||||
f11_local1 = self:getRootController()
|
||||
end
|
||||
assert( f11_local1 )
|
||||
local f11_local2 = self
|
||||
local ConquestButton = nil
|
||||
|
||||
ConquestButton = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f11_local1
|
||||
} )
|
||||
ConquestButton.id = "ConquestButton"
|
||||
ConquestButton.buttonDescription = Engine.Localize( "Browse for Custom Servers" )
|
||||
ConquestButton.Text:setText( ToUpperCase( Engine.Localize( "Server Browser" ) ), 0 )
|
||||
ConquestButton:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 500, 0, _1080p * 30 )
|
||||
self:addElement( ConquestButton )
|
||||
self.ConquestButton = ConquestButton
|
||||
|
||||
local f11_local5 = nil
|
||||
if not CONDITIONS.IsTrialLicense( self ) then
|
||||
f11_local5 = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f11_local1
|
||||
} )
|
||||
f11_local5.id = "CustomGameButton"
|
||||
|
||||
if not CONDITIONS.IsTrialLicense( self ) then
|
||||
f11_local5.buttonDescription = Engine.Localize( "LUA_MENU_CUSTOM_GAME_DESC" )
|
||||
end
|
||||
f11_local5.Text:setText( Engine.Localize( "LUA_MENU_CUSTOM_GAME_CAPS" ), 0 )
|
||||
f11_local5:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 500, _1080p * 80, _1080p * 110 )
|
||||
self:addElement( f11_local5 )
|
||||
self.CustomGameButton = f11_local5
|
||||
end
|
||||
|
||||
|
||||
local CRMMain = nil
|
||||
|
||||
CRMMain = MenuBuilder.BuildRegisteredType( "CRMMain", {
|
||||
controllerIndex = f11_local1
|
||||
} )
|
||||
CRMMain.id = "CRMMain"
|
||||
CRMMain:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 6, _1080p * 317, _1080p * 385, _1080p * 579 )
|
||||
self:addElement( CRMMain )
|
||||
self.CRMMain = CRMMain
|
||||
|
||||
f0_local3Buttons( self, f11_local1, controller )
|
||||
return self
|
||||
end
|
||||
|
||||
MenuBuilder.m_types["MPMainMenuButtons"] = MPMainMenuButtons
|
2
data/cdata/ui_scripts/MainMenu/__init__.lua
Normal file
2
data/cdata/ui_scripts/MainMenu/__init__.lua
Normal file
@ -0,0 +1,2 @@
|
||||
require("MPMainMenu")
|
||||
require("CPMainMenu")
|
68
data/cdata/ui_scripts/SystemLinkMenu/ServerButtons.lua
Normal file
68
data/cdata/ui_scripts/SystemLinkMenu/ServerButtons.lua
Normal file
@ -0,0 +1,68 @@
|
||||
function SystemLinkMenuButtons( menu, controller )
|
||||
local self = LUI.UIVerticalList.new()
|
||||
self:SetAnchorsAndPosition( 0, 1, 0, 1, 0, 500 * _1080p, 0, 300 * _1080p )
|
||||
self.id = "SystemLinkMenuButtons"
|
||||
local f1_local1 = controller and controller.controllerIndex
|
||||
if not f1_local1 and not Engine.InFrontend() then
|
||||
f1_local1 = self:getRootController()
|
||||
end
|
||||
assert( f1_local1 )
|
||||
local f1_local2 = self
|
||||
self:SetSpacing( 10 * _1080p )
|
||||
|
||||
local f1_local5 = nil
|
||||
if CONDITIONS.IsCoreMultiplayer( self ) then
|
||||
f1_local5 = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f1_local1
|
||||
} )
|
||||
f1_local5.id = "CASButton"
|
||||
if CONDITIONS.IsCoreMultiplayer( self ) then
|
||||
|
||||
else
|
||||
|
||||
end
|
||||
if CONDITIONS.IsCoreMultiplayer( self ) then
|
||||
f1_local5.buttonDescription = Engine.Localize( "LUA_MENU_DESC_CREATE_A_CLASS" )
|
||||
end
|
||||
f1_local5.Text:setText( ToUpperCase( Engine.Localize( "LUA_MENU_CREATE_A_CLASS" ) ), 0 )
|
||||
f1_local5:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 500, _1080p * 80, _1080p * 110 )
|
||||
self:addElement( f1_local5 )
|
||||
self.CASButton = f1_local5
|
||||
end
|
||||
local f1_local6 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f1_local6 = MenuBuilder.BuildRegisteredType( "MenuButton", {
|
||||
controllerIndex = f1_local1
|
||||
} )
|
||||
f1_local6.id = "LoadoutButton"
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
|
||||
else
|
||||
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f1_local6.buttonDescription = Engine.Localize( "LUA_MENU_ZM_LOADOUT_DESC" )
|
||||
end
|
||||
f1_local6.Text:setText( ToUpperCase( Engine.Localize( "LUA_MENU_ZM_LOADOUT_CAPS" ) ), 0 )
|
||||
f1_local6:SetAnchorsAndPosition( 0, 1, 0, 1, 0, _1080p * 500, _1080p * 120, _1080p * 150 )
|
||||
self:addElement( f1_local6 )
|
||||
self.LoadoutButton = f1_local6
|
||||
end
|
||||
|
||||
|
||||
if CONDITIONS.IsCoreMultiplayer( self ) then
|
||||
f1_local5:addEventHandler( "button_action", function ( f2_arg0, f2_arg1 )
|
||||
local f2_local0 = f2_arg1.controller or f1_local1
|
||||
ACTIONS.OpenCreateAClass( self, f2_arg1 )
|
||||
end )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f1_local6:addEventHandler( "button_action", function ( f3_arg0, f3_arg1 )
|
||||
ACTIONS.OpenMenu( "CPLoadoutMenu", true, f3_arg1.controller or f1_local1 )
|
||||
end )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
MenuBuilder.m_types["SystemLinkMenuButtons"] = SystemLinkMenuButtons
|
848
data/cdata/ui_scripts/SystemLinkMenu/SysLinkBrowser.lua
Normal file
848
data/cdata/ui_scripts/SystemLinkMenu/SysLinkBrowser.lua
Normal file
@ -0,0 +1,848 @@
|
||||
local f0_local0 = "frontEnd.systemLinkMenu.serverBrowser"
|
||||
serverBrowserOffsets = {
|
||||
10,
|
||||
240,
|
||||
360,
|
||||
450
|
||||
}
|
||||
|
||||
local f0_local4 = function ( f5_arg0, f5_arg1 )
|
||||
Engine.ExecNow( "xstopprivateparty", f5_arg1.controller )
|
||||
Engine.SetDvarBool( "systemlink", false )
|
||||
Engine.SetDvarBool( "systemlink_host", false )
|
||||
Engine.StopGameMode()
|
||||
LUI.FlowManager.RequestLeaveMenu( f5_arg0, true )
|
||||
end
|
||||
|
||||
local f0_local6 = nil
|
||||
f0_local6 = function ( menu, controller, index )
|
||||
local f9_local0 = menu:Wait( 250 )
|
||||
f9_local0.onComplete = function ()
|
||||
return f0_local6( menu, controller )
|
||||
end
|
||||
|
||||
Lobby.UpdateServerDisplayList( controller )
|
||||
Lobby.CreateServersDataModels( controller )
|
||||
end
|
||||
|
||||
local f0_local7 = function ( f11_arg0, f11_arg1, f11_arg2 )
|
||||
|
||||
assert( f11_arg0.ServerBrowser )
|
||||
assert( f11_arg0.ServerBrowser.ServerList )
|
||||
f11_arg0:setPriority( -1 )
|
||||
f11_arg0.isSignInMenu = true
|
||||
local f11_local0 = Engine.IsAliensMode()
|
||||
if f11_local0 then
|
||||
Engine.SetFrontEndSceneSection( "zm_main", 1 )
|
||||
end
|
||||
|
||||
if not f11_local0 then
|
||||
f11_arg0.MenuTitle.MenuBreadcrumbs:setText( ToUpperCase( Engine.Localize( "LUA_MENU_BREADCRUMB_2_ITEMS", "IW7-Mod", "MULTIPLAYER" ) ), 0 )
|
||||
end
|
||||
|
||||
f11_arg0.addButtonHelperFunction = function ( f12_arg0, f12_arg1 )
|
||||
f11_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "MENU_SB_TOOLTIP_BTN_REFRESH" ),
|
||||
button_ref = "button_alt1",
|
||||
side = "left",
|
||||
priority = 2,
|
||||
clickable = true
|
||||
} )
|
||||
end
|
||||
|
||||
f11_arg0:addEventHandler( "menu_create", f11_arg0.addButtonHelperFunction )
|
||||
|
||||
assert( Engine.IsUserSignedIn( f11_arg1 ) )
|
||||
if f11_local0 then
|
||||
Engine.ExecNow( CPConfig.default_systemlink, f11_arg1 )
|
||||
else
|
||||
Engine.ExecNow( MPConfig.default_systemlink, f11_arg1 )
|
||||
end
|
||||
if not Lobby.IsInPrivateParty() then
|
||||
Engine.ExecNow( "xstartprivateparty", f11_arg1 )
|
||||
end
|
||||
|
||||
Engine.Exec( MPConfig.default_dvars )
|
||||
|
||||
f11_arg0:addEventHandler( "menu_create", function ( f13_arg0, f13_arg1 )
|
||||
|
||||
assert( f11_arg0.bindButton )
|
||||
|
||||
if CONDITIONS.IsThirdGameMode( f11_arg0 ) then
|
||||
ACTIONS.AnimateSequence( f11_arg0, "DisplayServerBrowser" )
|
||||
end
|
||||
|
||||
f11_arg0.bindButton:addEventHandler( "button_secondary", function ( f14_arg0, f14_arg1 )
|
||||
local f14_local0 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
if f14_local0.serverBrowserFocused then
|
||||
f14_local0.serverBrowserFocused = false
|
||||
ACTIONS.LoseFocus( f11_arg0, "ServerBrowser", f11_arg1 )
|
||||
ACTIONS.GainFocus( f11_arg0.SystemLinkMenuButtons, "JoinGameButton", f11_arg1 )
|
||||
else
|
||||
f0_local4( f14_arg0, f14_arg1 )
|
||||
end
|
||||
end )
|
||||
|
||||
f11_arg0.bindButton:addEventHandler( "button_alt1", function ( f15_arg0, f15_arg1 )
|
||||
Lobby.RefreshServerList( f11_arg1 )
|
||||
ACTIONS.PlaySoundSetSound( f11_arg0, "selectAlt", false )
|
||||
end )
|
||||
end )
|
||||
f11_arg0.SystemLinkMenuButtons:addEventHandler( "gain_focus", function ( f16_arg0, f16_arg1 )
|
||||
local f16_local0 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
if f16_local0.serverBrowserFocused then
|
||||
f16_local0.serverBrowserFocused = false
|
||||
ACTIONS.LoseFocus( f11_arg0, "ServerBrowser", f11_arg1 )
|
||||
if CONDITIONS.IsThirdGameMode( f11_arg0 ) then
|
||||
ACTIONS.AnimateSequence( f11_arg0, "DisplayServerBrowser" )
|
||||
f11_arg0:RemoveButtonHelperText( "button_alt1", "left" )
|
||||
end
|
||||
end
|
||||
end )
|
||||
|
||||
|
||||
Engine.PLMRefreshData()
|
||||
if Engine.IsCoreMode() then
|
||||
FrontEndScene.CurrentMissionTeam = MissionDirector.InvalidTeamID
|
||||
FrontEndScene.SetScene( "private_lobby_menu" )
|
||||
ClientCharacter.SetCharacterVisible( FrontEndScene.ClientCharacters.Self, true )
|
||||
if Fences.OfflineDataFetched( f11_arg1 ) then
|
||||
local f11_local1 = CoD.GetPrivateLoadoutDataSource()
|
||||
local f11_local2 = f11_local1.squadMembers.head:GetValue( f11_arg1 )
|
||||
local f11_local3 = f11_local1.squadMembers.body:GetValue( f11_arg1 )
|
||||
local f11_local4 = f11_local1.squadMembers.archetype:GetValue( f11_arg1 )
|
||||
local f11_local5 = f11_local1.squadMembers.archetypeSuper:GetValue( f11_arg1 )
|
||||
FrontEndScene.SetCharacterModelsByIndex( FrontEndScene.ClientCharacters.Self, f11_local3, f11_local2 )
|
||||
FrontEndScene.SetWeaponForSuper( FrontEndScene.ClientCharacters.Self, f11_local5, f11_local4 )
|
||||
FrontEndScene.PlayIdleForSuper( FrontEndScene.ClientCharacters.Self, f11_local5, f11_local4 )
|
||||
ClientWeapon.SetWeaponIsViewModel( 0, true )
|
||||
ClientWeapon.SetWeaponVisible( 0, false )
|
||||
ClientCharacter.SetCharacterVisible( 0, true )
|
||||
end
|
||||
end
|
||||
Lobby.SetPartyUIRoot( PartyUIRoot.SYSTEM_LINK )
|
||||
local f11_local1 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
if f11_local1.optionsMenuOpened then
|
||||
f11_local1.optionsMenuOpened = nil
|
||||
if f11_local1.serverBrowserFocused then
|
||||
f11_local1.serverBrowserFocused = false
|
||||
f11_arg0:clearSavedState()
|
||||
if f11_local0 then
|
||||
LUI.FlowManager.ClearSavedMenuState( "CPSystemLinkMenu" )
|
||||
else
|
||||
LUI.FlowManager.ClearSavedMenuState( "MPSystemLinkMenu" )
|
||||
end
|
||||
end
|
||||
else
|
||||
f11_local1.serverBrowserFocused = false
|
||||
end
|
||||
Lobby.BuildServerList( f11_arg1 )
|
||||
Lobby.RefreshServerList( f11_arg1 )
|
||||
|
||||
assert( f11_arg0.ServerBrowser )
|
||||
assert( f11_arg0.ServerBrowser.ServerList )
|
||||
local f11_local2 = LUI.DataSourceInGlobalModel.new( f0_local0 .. ".serverCount" )
|
||||
f11_arg0:SubscribeToModel( f11_local2:GetModel( f11_arg1 ), function ()
|
||||
local f17_local0 = f11_local2:GetValue( f11_arg1 )
|
||||
if f17_local0 ~= nil then
|
||||
if f17_local0 == 0 then
|
||||
local f17_local1 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
if f17_local1.serverBrowserFocused then
|
||||
f17_local1.serverBrowserFocused = false
|
||||
ACTIONS.LoseFocus( f11_arg0, "ServerBrowser", f11_arg1 )
|
||||
end
|
||||
end
|
||||
f11_arg0.ServerBrowser:SetBlurHeight( f17_local0 )
|
||||
end
|
||||
end )
|
||||
local f11_local3 = LUI.DataSourceFromList.new( f11_local2 )
|
||||
f11_local3.MakeDataSourceAtIndex = function ( f18_arg0, f18_arg1, f18_arg2 )
|
||||
local f18_local0 = f18_arg1 % 2 and COLORS.white or COLORS.black
|
||||
local f18_local1 = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".status" )
|
||||
return {
|
||||
index = f18_arg1,
|
||||
color = f18_local0,
|
||||
host = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".host" ),
|
||||
map = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".map" ),
|
||||
players = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".players" ),
|
||||
type = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".type" ),
|
||||
status = f18_local1:Filter( "status", function ( f19_arg0, f19_arg1 )
|
||||
local f19_local0
|
||||
if f19_arg0 == 1 then
|
||||
f19_local0 = Engine.Localize( "MENU_LOBBY" )
|
||||
if not f19_local0 then
|
||||
|
||||
else
|
||||
return f19_local0
|
||||
end
|
||||
end
|
||||
f19_local0 = Engine.Localize( "MENU_IN_GAME_CAPS" )
|
||||
end
|
||||
)
|
||||
}
|
||||
end
|
||||
|
||||
f11_arg0.ServerBrowser.ServerList:SetGridDataSource( f11_local3 )
|
||||
assert( f11_arg0.bindButton )
|
||||
f11_arg0.bindButton:addEventHandler( "button_start", function ( f20_arg0, f20_arg1 )
|
||||
local f20_local0 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
f20_local0.optionsMenuOpened = true
|
||||
ACTIONS.OpenMenu( "OptionsMenu", true, f20_arg1.controller )
|
||||
ACTIONS.PlaySoundSetSound( f11_arg0, "selectAlt", false )
|
||||
end )
|
||||
|
||||
local f11_local4 = f11_arg0:Wait( 250 )
|
||||
f11_local4.onComplete = function ()
|
||||
return f0_local6( f11_arg0, f11_arg1 )
|
||||
end
|
||||
|
||||
Engine.StopMenuVideo()
|
||||
end
|
||||
|
||||
MenuBuilder.m_types["SystemLinkMenu"] = function ( menu, controller )
|
||||
local self = LUI.UIElement.new()
|
||||
self.id = "SystemLinkMenu"
|
||||
self._animationSets = {}
|
||||
self._sequences = {}
|
||||
local f22_local1 = controller and controller.controllerIndex
|
||||
if not f22_local1 and not Engine.InFrontend() then
|
||||
f22_local1 = self:getRootController()
|
||||
end
|
||||
assert( f22_local1 )
|
||||
self.soundSet = "cpMainMenuDefault"
|
||||
self:playSound( "menu_open" )
|
||||
local f22_local2 = self
|
||||
local f22_local3 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local3 = MenuBuilder.BuildRegisteredType( "CPMenuOuterMask", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
f22_local3.id = "OuterMaskTop"
|
||||
f22_local3:SetZRotation( -168, 0 )
|
||||
f22_local3:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -320, _1080p * 100 )
|
||||
self:addElement( f22_local3 )
|
||||
self.OuterMaskTop = f22_local3
|
||||
end
|
||||
local f22_local4 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local4 = MenuBuilder.BuildRegisteredType( "CPMenuOuterMask", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
f22_local4.id = "OuterMaskBottom"
|
||||
f22_local4:SetZRotation( -168, 0 )
|
||||
f22_local4:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -205, _1080p * 215 )
|
||||
self:addElement( f22_local4 )
|
||||
self.OuterMaskBottom = f22_local4
|
||||
end
|
||||
local f22_local5 = nil
|
||||
if CONDITIONS.IsCoreMultiplayer( self ) then
|
||||
f22_local5 = MenuBuilder.BuildRegisteredType( "MenuTitle", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
f22_local5.id = "MenuTitle"
|
||||
f22_local5.MenuTitle:setText( ToUpperCase( Engine.Localize( "SERVER BROWSER" ) ), 0 )
|
||||
f22_local5.MenuBreadcrumbs:setText( ToUpperCase( Engine.Localize( "EXE_LOCAL_PLAY" ) ), 0 )
|
||||
f22_local5.Icon:SetTop( _1080p * -28.5, 0 )
|
||||
f22_local5.Icon:SetBottom( _1080p * 61.5, 0 )
|
||||
f22_local5:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 96, _1080p * 1056, _1080p * 54, _1080p * 134 )
|
||||
self:addElement( f22_local5 )
|
||||
self.MenuTitle = f22_local5
|
||||
end
|
||||
local ButtonHelperBar = nil
|
||||
|
||||
ButtonHelperBar = MenuBuilder.BuildRegisteredType( "ButtonHelperBar", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
ButtonHelperBar.id = "ButtonHelperBar"
|
||||
ButtonHelperBar:SetAnchorsAndPosition( 0, 0, 1, 0, 0, 0, _1080p * -85, 0 )
|
||||
self:addElement( ButtonHelperBar )
|
||||
self.ButtonHelperBar = ButtonHelperBar
|
||||
|
||||
local SocialFeed = nil
|
||||
|
||||
SocialFeed = MenuBuilder.BuildRegisteredType( "SocialFeed", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
SocialFeed.id = "SocialFeed"
|
||||
SocialFeed:SetAnchorsAndPosition( 0, 0, 1, 0, 0, 0, _1080p * -115, _1080p * -85 )
|
||||
self:addElement( SocialFeed )
|
||||
self.SocialFeed = SocialFeed
|
||||
|
||||
local SystemLinkMenuButtons = nil
|
||||
|
||||
SystemLinkMenuButtons = MenuBuilder.BuildRegisteredType( "SystemLinkMenuButtons", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
SystemLinkMenuButtons.id = "SystemLinkMenuButtons"
|
||||
SystemLinkMenuButtons:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 630, _1080p * 216, _1080p * 438 )
|
||||
self:addElement( SystemLinkMenuButtons )
|
||||
self.SystemLinkMenuButtons = SystemLinkMenuButtons
|
||||
|
||||
local f22_local9 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local9 = MenuBuilder.BuildRegisteredType( "LobbyMembers", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
f22_local9.id = "LobbyMembers"
|
||||
f22_local9:SetAlpha( 0, 0 )
|
||||
f22_local9:SetAnchorsAndPosition( 1, 0, 0, 1, _1080p * -1790, _1080p * -1090, _1080p * 791.5, _1080p * 1435.5 )
|
||||
self:addElement( f22_local9 )
|
||||
self.LobbyMembers = f22_local9
|
||||
end
|
||||
local ServerBrowser = nil
|
||||
|
||||
ServerBrowser = MenuBuilder.BuildRegisteredType( "ServerBrowser", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
ServerBrowser.id = "ServerBrowser"
|
||||
ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 659, _1080p * 1790, _1080p * 216, _1080p * 885 )
|
||||
self:addElement( ServerBrowser )
|
||||
self.ServerBrowser = ServerBrowser
|
||||
|
||||
local f22_local11 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local11 = LUI.UIImage.new()
|
||||
f22_local11.id = "BloodSplat"
|
||||
f22_local11:SetAlpha( 0.5, 0 )
|
||||
f22_local11:setImage( RegisterMaterial( "cp_menu_zombies_blood_splats_large" ), 0 )
|
||||
f22_local11:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 48, _1080p * 678, _1080p * -71, _1080p * 441 )
|
||||
self:addElement( f22_local11 )
|
||||
self.BloodSplat = f22_local11
|
||||
end
|
||||
local f22_local12 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local12 = LUI.UIImage.new()
|
||||
f22_local12.id = "ZombiesLogo"
|
||||
f22_local12:setImage( RegisterMaterial( "cp_menu_zombies_logo" ), 0 )
|
||||
f22_local12:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 60, _1080p * 740, _1080p * 34, _1080p * 434 )
|
||||
self:addElement( f22_local12 )
|
||||
self.ZombiesLogo = f22_local12
|
||||
end
|
||||
local f22_local13 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local13 = LUI.UIStyledText.new()
|
||||
f22_local13.id = "ZomLanPartyShadow"
|
||||
f22_local13:SetRGBFromInt( 0, 0 )
|
||||
f22_local13:setText( Engine.Localize( "Server Browser" ), 0 )
|
||||
f22_local13:SetFontSize( 36 * _1080p )
|
||||
f22_local13:SetFont( FONTS.GetFont( FONTS.ZmClean.File ) )
|
||||
f22_local13:SetAlignment( LUI.Alignment.Center )
|
||||
f22_local13:SetOptOutRightToLeftAlignmentFlip( true )
|
||||
f22_local13:SetShadowRGBFromInt( 0, 0 )
|
||||
f22_local13:SetOutlineRGBFromInt( 0, 0 )
|
||||
f22_local13:SetDecodeLetterLength( 25 )
|
||||
f22_local13:SetDecodeMaxRandChars( 3 )
|
||||
f22_local13:SetDecodeUpdatesPerLetter( 4 )
|
||||
f22_local13:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 272, _1080p * 597.5, _1080p * 302, _1080p * 338 )
|
||||
self:addElement( f22_local13 )
|
||||
self.ZomLanPartyShadow = f22_local13
|
||||
end
|
||||
local f22_local14 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local14 = LUI.UIStyledText.new()
|
||||
f22_local14.id = "ZomLanParty"
|
||||
f22_local14:SetRGBFromInt( 14042667, 0 )
|
||||
f22_local14:setText( Engine.Localize( "Server Browser" ), 0 )
|
||||
f22_local14:SetFontSize( 36 * _1080p )
|
||||
f22_local14:SetFont( FONTS.GetFont( FONTS.ZmClean.File ) )
|
||||
f22_local14:SetAlignment( LUI.Alignment.Center )
|
||||
f22_local14:SetOptOutRightToLeftAlignmentFlip( true )
|
||||
f22_local14:SetShadowRGBFromInt( 0, 0 )
|
||||
f22_local14:SetOutlineRGBFromInt( 0, 0 )
|
||||
f22_local14:SetDecodeLetterLength( 25 )
|
||||
f22_local14:SetDecodeMaxRandChars( 3 )
|
||||
f22_local14:SetDecodeUpdatesPerLetter( 4 )
|
||||
f22_local14:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 272, _1080p * 597.5, _1080p * 302, _1080p * 338 )
|
||||
self:addElement( f22_local14 )
|
||||
self.ZomLanParty = f22_local14
|
||||
end
|
||||
local MPLobbyMembersPlayercards = nil
|
||||
|
||||
MPLobbyMembersPlayercards = MenuBuilder.BuildRegisteredType( "MPLobbyMembersPlayercards", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
MPLobbyMembersPlayercards.id = "MPLobbyMembersPlayercards"
|
||||
MPLobbyMembersPlayercards:SetAnchorsAndPosition( 0, 1, 1, 0, _1080p * 130, _1080p * 630, _1080p * -255, _1080p * -189 )
|
||||
self:addElement( MPLobbyMembersPlayercards )
|
||||
self.MPLobbyMembersPlayercards = MPLobbyMembersPlayercards
|
||||
|
||||
local ButtonDescriptionText = nil
|
||||
|
||||
ButtonDescriptionText = MenuBuilder.BuildRegisteredType( "ButtonDescriptionText", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
ButtonDescriptionText.id = "ButtonDescriptionText"
|
||||
ButtonDescriptionText:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 550, _1080p * 334, _1080p * 366 )
|
||||
self:addElement( ButtonDescriptionText )
|
||||
self.ButtonDescriptionText = ButtonDescriptionText
|
||||
|
||||
self._animationSets.DefaultAnimationSet = function ()
|
||||
ServerBrowser:RegisterAnimationSequence( "DefaultSequence", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 1, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 659, _1080p * 1790, _1080p * 216, _1080p * 885, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.DefaultSequence = function ()
|
||||
ServerBrowser:AnimateSequence( "DefaultSequence" )
|
||||
end
|
||||
|
||||
SystemLinkMenuButtons:RegisterAnimationSequence( "IntroCore", {
|
||||
{
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAlpha( 1, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 630, _1080p * 216, _1080p * 438, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
ServerBrowser:RegisterAnimationSequence( "IntroCore", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 1, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 659, _1080p * 1790, _1080p * 216, _1080p * 885, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.IntroCore = function ()
|
||||
SystemLinkMenuButtons:AnimateSequence( "IntroCore" )
|
||||
ServerBrowser:AnimateSequence( "IntroCore" )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
self._animationSets.ThirdGameModeAnimationSet = function ()
|
||||
self._sequences.DefaultSequence = function ()
|
||||
|
||||
end
|
||||
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local3:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAlpha( 0.6, 500, LUI.EASING.outBack )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -635, _1080p * -215, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -635, _1080p * -215, 500, LUI.EASING.outBack )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -320, _1080p * 100, 500, LUI.EASING.outQuadratic )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -320, _1080p * 100, 139 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -280, _1080p * 140, 9 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -320, _1080p * 100, 200, LUI.EASING.outQuadratic )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local4:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAlpha( 0.6, 500, LUI.EASING.outBack )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * 225, _1080p * 645, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * 225, _1080p * 645, 500, LUI.EASING.outBack )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -205, _1080p * 215, 500, LUI.EASING.outQuadratic )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -205, _1080p * 215, 139 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -245, _1080p * 175, 9 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -205, _1080p * 215, 200, LUI.EASING.outQuadratic )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
SystemLinkMenuButtons:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAlpha( 0, 1220 )
|
||||
end,
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAlpha( 1, 490 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 630, _1080p * 406, _1080p * 628, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local9:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.LobbyMembers:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.LobbyMembers:SetAlpha( 0, 2000 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
ServerBrowser:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 0, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 789, _1080p * 1920, _1080p * 133, _1080p * 802, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local11:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0, 140 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0.5, 10 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0.5, 200, LUI.EASING.outQuadratic )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0.4, 650, LUI.EASING.outQuadratic )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.BloodSplat:SetZRotation( -5, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetZRotation( -5, 150 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetZRotation( 0, 850, LUI.EASING.outQuadratic )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.BloodSplat:playSound( "splat", false, 1150 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.BloodSplat:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 218.92, _1080p * 547.08, _1080p * 51.65, _1080p * 318.35, 1149 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 88, _1080p * 718, _1080p * -71, _1080p * 441, 70 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 80, _1080p * 710, _1080p * -71, _1080p * 441, 129, LUI.EASING.outQuadratic )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local12:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAlpha( 0, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAlpha( 1, 150 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ZombiesLogo:SetZRotation( 5, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetZRotation( 5, 150 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetZRotation( 0, 850, LUI.EASING.outQuadratic )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * -429.8, _1080p * 1249.8, _1080p * -260, _1080p * 728, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 80, _1080p * 720, _1080p * 51.65, _1080p * 416.35, 149 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70, _1080p * 750, _1080p * 34, _1080p * 434, 200 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70, _1080p * 750, _1080p * 36, _1080p * 436, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 68, _1080p * 748, _1080p * 35.68, _1080p * 435.68, 50 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70.35, _1080p * 750.35, _1080p * 33.39, _1080p * 433.39, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70.28, _1080p * 750.28, _1080p * 31.51, _1080p * 431.51, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 68.22, _1080p * 748.22, _1080p * 34.03, _1080p * 434.03, 50 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70.64, _1080p * 750.64, _1080p * 34.02, _1080p * 434.02, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70.47, _1080p * 750.47, _1080p * 36.01, _1080p * 436.01, 50 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 68.33, _1080p * 748.33, _1080p * 35.4, _1080p * 435.4, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 68.93, _1080p * 748.93, _1080p * 32.9, _1080p * 432.9, 59 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 69.4, _1080p * 749.4, _1080p * 35.38, _1080p * 435.38, 40 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 69.73, _1080p * 749.73, _1080p * 36.61, _1080p * 436.61, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 71.93, _1080p * 751.93, _1080p * 34.65, _1080p * 434.65, 50 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70, _1080p * 750, _1080p * 34, _1080p * 434, 49, LUI.EASING.outQuadratic )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local13:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ZomLanPartyShadow:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZomLanPartyShadow:SetAlpha( 0, 1710 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZomLanPartyShadow:SetAlpha( 1, 290 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local14:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ZomLanParty:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZomLanParty:SetAlpha( 0, 1220 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZomLanParty:SetAlpha( 1, 490 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ZomLanParty:SetRGBFromInt( 14042667, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
MPLobbyMembersPlayercards:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.MPLobbyMembersPlayercards:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.MPLobbyMembersPlayercards:SetAlpha( 0, 700 )
|
||||
end,
|
||||
function ()
|
||||
return self.MPLobbyMembersPlayercards:SetAlpha( 0, 1010 )
|
||||
end,
|
||||
function ()
|
||||
return self.MPLobbyMembersPlayercards:SetAlpha( 1, 290 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
ButtonDescriptionText:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetAlpha( 0, 1220 )
|
||||
end,
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetAlpha( 1, 490 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetRGBFromTable( SWATCHES.text.primaryText, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 132, _1080p * 552, _1080p * 524, _1080p * 556, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.Intro = function ()
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local3:AnimateSequence( "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local4:AnimateSequence( "Intro" )
|
||||
end
|
||||
SystemLinkMenuButtons:AnimateSequence( "Intro" )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local9:AnimateSequence( "Intro" )
|
||||
end
|
||||
ServerBrowser:AnimateSequence( "Intro" )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local11:AnimateSequence( "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local12:AnimateSequence( "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local13:AnimateSequence( "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local14:AnimateSequence( "Intro" )
|
||||
end
|
||||
MPLobbyMembersPlayercards:AnimateSequence( "Intro" )
|
||||
ButtonDescriptionText:AnimateSequence( "Intro" )
|
||||
end
|
||||
|
||||
ServerBrowser:RegisterAnimationSequence( "DisplayServerBrowser", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 1, 80 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 727, _1080p * 1858, _1080p * 216, _1080p * 885, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.DisplayServerBrowser = function ()
|
||||
ServerBrowser:AnimateSequence( "DisplayServerBrowser" )
|
||||
end
|
||||
|
||||
ServerBrowser:RegisterAnimationSequence( "HideServerBrowser", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 1, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 0, 80 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.HideServerBrowser = function ()
|
||||
ServerBrowser:AnimateSequence( "HideServerBrowser" )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
self._animationSets.DefaultAnimationSet()
|
||||
self.addButtonHelperFunction = function ( f117_arg0, f117_arg1 )
|
||||
f117_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_SELECT" ),
|
||||
button_ref = "button_primary",
|
||||
side = "left",
|
||||
clickable = true
|
||||
} )
|
||||
f117_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_BACK" ),
|
||||
button_ref = "button_secondary",
|
||||
side = "left",
|
||||
priority = 1,
|
||||
clickable = true
|
||||
} )
|
||||
f117_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_OPTIONS_CAPS" ),
|
||||
button_ref = "button_start",
|
||||
side = "left",
|
||||
priority = 4,
|
||||
clickable = true
|
||||
} )
|
||||
end
|
||||
|
||||
self:addEventHandler( "menu_create", self.addButtonHelperFunction )
|
||||
|
||||
local bindButton = LUI.UIBindButton.new()
|
||||
bindButton.id = "selfBindButton"
|
||||
self:addElement( bindButton )
|
||||
self.bindButton = bindButton
|
||||
|
||||
f0_local7( self, f22_local1, controller )
|
||||
ACTIONS.AnimateSequence( self, "DefaultSequence" )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
ACTIONS.SetAnimationSet( self, "ThirdGameModeAnimationSet" )
|
||||
ACTIONS.AnimateSequence( self, "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsCoreMultiplayer( self ) then
|
||||
ACTIONS.SetAnimationSet( self, "DefaultAnimationSet" )
|
||||
ACTIONS.AnimateSequence( self, "IntroCore" )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
LUI.FlowManager.RegisterStackPushBehaviour( "SystemLinkMenu", PushFunc )
|
||||
LUI.FlowManager.RegisterStackPopBehaviour( "SystemLinkMenu", f0_local3 )
|
@ -1,899 +1,2 @@
|
||||
f0_local1 = nil
|
||||
f0_local0 = "frontEnd.systemLinkMenu.serverBrowser"
|
||||
|
||||
LUI.FlowManager.RegisterFenceGroup( "MPSystemLinkMenu", {
|
||||
"mp",
|
||||
"mpInstall",
|
||||
"offlineData"
|
||||
} )
|
||||
LUI.FlowManager.RegisterFenceGroup( "CPSystemLinkMenu", {
|
||||
"cp",
|
||||
"offlineData"
|
||||
} )
|
||||
LUI.FlowManager.RequestSetStack( "CPSystemLinkMenu", {
|
||||
{
|
||||
name = "MainLockoutMenu"
|
||||
},
|
||||
{
|
||||
name = "MainMenu"
|
||||
}
|
||||
} )
|
||||
LUI.FlowManager.RequestSetStack( "MPSystemLinkMenu", {
|
||||
{
|
||||
name = "MainLockoutMenu"
|
||||
},
|
||||
{
|
||||
name = "MainMenu"
|
||||
}
|
||||
} )
|
||||
|
||||
serverBrowserOffsets = {
|
||||
10,
|
||||
240,
|
||||
360,
|
||||
450
|
||||
}
|
||||
|
||||
LUI.FlowManager.RegisterStackPushBehaviour( "MPSystemLinkMenu", function ()
|
||||
Engine.PlayMusic( CoD.Music.MainMPMusic )
|
||||
utils.mp.FenceOnlineData.FenceOnlineData.OnBackOut()
|
||||
end )
|
||||
LUI.FlowManager.RegisterStackPushBehaviour( "CPSystemLinkMenu", function ()
|
||||
Engine.PlayMusic( CoD.Music.MainCPMusic )
|
||||
utils.mp.FenceOnlineData.FenceOnlineData.OnBackOut()
|
||||
end )
|
||||
local f0_local3 = function ()
|
||||
clearMatchData()
|
||||
WipeGlobalModelsAtPath( f0_local0 )
|
||||
end
|
||||
|
||||
LUI.FlowManager.RegisterStackPopBehaviour( "MPSystemLinkMenu", f0_local3 )
|
||||
LUI.FlowManager.RegisterStackPopBehaviour( "CPSystemLinkMenu", f0_local3 )
|
||||
local f0_local4 = function ( f5_arg0, f5_arg1 )
|
||||
Engine.ExecNow( "xstopprivateparty", f5_arg1.controller )
|
||||
Engine.SetDvarBool( "systemlink", false )
|
||||
Engine.SetDvarBool( "systemlink_host", false )
|
||||
Engine.StopGameMode()
|
||||
LUI.FlowManager.RequestLeaveMenu( f5_arg0, true )
|
||||
end
|
||||
|
||||
local f0_local6 = nil
|
||||
f0_local6 = function ( menu, controller, index )
|
||||
local f9_local0 = menu:Wait( 250 )
|
||||
f9_local0.onComplete = function ()
|
||||
return f0_local6( menu, controller )
|
||||
end
|
||||
|
||||
Lobby.UpdateServerDisplayList( controller )
|
||||
Lobby.CreateServersDataModels( controller )
|
||||
end
|
||||
|
||||
local f0_local7 = function ( f11_arg0, f11_arg1, f11_arg2 )
|
||||
|
||||
assert( f11_arg0.ServerBrowser )
|
||||
assert( f11_arg0.ServerBrowser.ServerList )
|
||||
f11_arg0:setPriority( -1 )
|
||||
f11_arg0.isSignInMenu = true
|
||||
local f11_local0 = Engine.IsAliensMode()
|
||||
if f11_local0 then
|
||||
Engine.SetFrontEndSceneSection( "zm_main", 1 )
|
||||
end
|
||||
|
||||
if not f11_local0 then
|
||||
f11_arg0.MenuTitle.MenuBreadcrumbs:setText( ToUpperCase( Engine.Localize( "LUA_MENU_BREADCRUMB_2_ITEMS", "IW7-Mod", "MULTIPLAYER" ) ), 0 )
|
||||
f11_arg0.addButtonHelperFunction = function ( f12_arg0, f12_arg1 )
|
||||
f11_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "MENU_SB_TOOLTIP_BTN_REFRESH" ),
|
||||
button_ref = "button_alt1",
|
||||
side = "left",
|
||||
priority = 2,
|
||||
clickable = true
|
||||
} )
|
||||
end
|
||||
|
||||
f11_arg0:addEventHandler( "menu_create", f11_arg0.addButtonHelperFunction )
|
||||
end
|
||||
|
||||
assert( Engine.IsUserSignedIn( f11_arg1 ) )
|
||||
if f11_local0 then
|
||||
Engine.ExecNow( CPConfig.default_systemlink, f11_arg1 )
|
||||
else
|
||||
Engine.ExecNow( MPConfig.default_systemlink, f11_arg1 )
|
||||
end
|
||||
if not Lobby.IsInPrivateParty() then
|
||||
Engine.ExecNow( "xstartprivateparty", f11_arg1 )
|
||||
end
|
||||
|
||||
Engine.Exec( MPConfig.default_dvars )
|
||||
|
||||
f11_arg0:addEventHandler( "menu_create", function ( f13_arg0, f13_arg1 )
|
||||
|
||||
assert( f11_arg0.bindButton )
|
||||
|
||||
f11_arg0.bindButton:addEventHandler( "button_secondary", function ( f14_arg0, f14_arg1 )
|
||||
local f14_local0 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
if f14_local0.serverBrowserFocused then
|
||||
f14_local0.serverBrowserFocused = false
|
||||
ACTIONS.LoseFocus( f11_arg0, "ServerBrowser", f11_arg1 )
|
||||
if CONDITIONS.IsThirdGameMode( f11_arg0 ) then
|
||||
ACTIONS.AnimateSequence( f11_arg0, "HideServerBrowser" )
|
||||
f11_arg0:RemoveButtonHelperText( "button_alt1", "left" )
|
||||
end
|
||||
ACTIONS.GainFocus( f11_arg0.SystemLinkMenuButtons, "JoinGameButton", f11_arg1 )
|
||||
else
|
||||
f0_local4( f14_arg0, f14_arg1 )
|
||||
end
|
||||
end )
|
||||
|
||||
f11_arg0.bindButton:addEventHandler( "button_alt1", function ( f15_arg0, f15_arg1 )
|
||||
Lobby.RefreshServerList( f11_arg1 )
|
||||
ACTIONS.PlaySoundSetSound( f11_arg0, "selectAlt", false )
|
||||
end )
|
||||
end )
|
||||
|
||||
Engine.PLMRefreshData()
|
||||
if Engine.IsCoreMode() then
|
||||
FrontEndScene.CurrentMissionTeam = MissionDirector.InvalidTeamID
|
||||
FrontEndScene.SetScene( "private_lobby_menu" )
|
||||
ClientCharacter.SetCharacterVisible( FrontEndScene.ClientCharacters.Self, true )
|
||||
if Fences.OfflineDataFetched( f11_arg1 ) then
|
||||
local f11_local1 = CoD.GetPrivateLoadoutDataSource()
|
||||
local f11_local2 = f11_local1.squadMembers.head:GetValue( f11_arg1 )
|
||||
local f11_local3 = f11_local1.squadMembers.body:GetValue( f11_arg1 )
|
||||
local f11_local4 = f11_local1.squadMembers.archetype:GetValue( f11_arg1 )
|
||||
local f11_local5 = f11_local1.squadMembers.archetypeSuper:GetValue( f11_arg1 )
|
||||
FrontEndScene.SetCharacterModelsByIndex( FrontEndScene.ClientCharacters.Self, f11_local3, f11_local2 )
|
||||
FrontEndScene.SetWeaponForSuper( FrontEndScene.ClientCharacters.Self, f11_local5, f11_local4 )
|
||||
FrontEndScene.PlayIdleForSuper( FrontEndScene.ClientCharacters.Self, f11_local5, f11_local4 )
|
||||
ClientWeapon.SetWeaponIsViewModel( 0, true )
|
||||
ClientWeapon.SetWeaponVisible( 0, false )
|
||||
ClientCharacter.SetCharacterVisible( 0, true )
|
||||
end
|
||||
end
|
||||
Lobby.SetPartyUIRoot( PartyUIRoot.SYSTEM_LINK )
|
||||
local f11_local1 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
if f11_local1.optionsMenuOpened then
|
||||
f11_local1.optionsMenuOpened = nil
|
||||
if f11_local1.serverBrowserFocused then
|
||||
f11_local1.serverBrowserFocused = false
|
||||
f11_arg0:clearSavedState()
|
||||
if f11_local0 then
|
||||
LUI.FlowManager.ClearSavedMenuState( "CPSystemLinkMenu" )
|
||||
else
|
||||
LUI.FlowManager.ClearSavedMenuState( "MPSystemLinkMenu" )
|
||||
end
|
||||
end
|
||||
else
|
||||
f11_local1.serverBrowserFocused = false
|
||||
end
|
||||
Lobby.BuildServerList( f11_arg1 )
|
||||
Lobby.RefreshServerList( f11_arg1 )
|
||||
|
||||
assert( f11_arg0.ServerBrowser )
|
||||
assert( f11_arg0.ServerBrowser.ServerList )
|
||||
local f11_local2 = LUI.DataSourceInGlobalModel.new( f0_local0 .. ".serverCount" )
|
||||
f11_arg0:SubscribeToModel( f11_local2:GetModel( f11_arg1 ), function ()
|
||||
local f17_local0 = f11_local2:GetValue( f11_arg1 )
|
||||
if f17_local0 ~= nil then
|
||||
if f17_local0 == 0 then
|
||||
local f17_local1 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
if f17_local1.serverBrowserFocused then
|
||||
f17_local1.serverBrowserFocused = false
|
||||
ACTIONS.LoseFocus( f11_arg0, "ServerBrowser", f11_arg1 )
|
||||
end
|
||||
end
|
||||
f11_arg0.ServerBrowser:SetBlurHeight( f17_local0 )
|
||||
end
|
||||
end )
|
||||
local f11_local3 = LUI.DataSourceFromList.new( f11_local2 )
|
||||
f11_local3.MakeDataSourceAtIndex = function ( f18_arg0, f18_arg1, f18_arg2 )
|
||||
local f18_local0 = f18_arg1 % 2 and COLORS.white or COLORS.black
|
||||
local f18_local1 = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".status" )
|
||||
return {
|
||||
index = f18_arg1,
|
||||
color = f18_local0,
|
||||
host = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".host" ),
|
||||
map = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".map" ),
|
||||
players = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".players" ),
|
||||
type = LUI.DataSourceInGlobalModel.new( f0_local0 .. "." .. f18_arg1 .. ".type" ),
|
||||
status = f18_local1:Filter( "status", function ( f19_arg0, f19_arg1 )
|
||||
local f19_local0
|
||||
if f19_arg0 == 1 then
|
||||
f19_local0 = Engine.Localize( "MENU_LOBBY" )
|
||||
if not f19_local0 then
|
||||
|
||||
else
|
||||
return f19_local0
|
||||
end
|
||||
end
|
||||
f19_local0 = Engine.Localize( "MENU_IN_GAME_CAPS" )
|
||||
end
|
||||
)
|
||||
}
|
||||
end
|
||||
|
||||
f11_arg0.ServerBrowser.ServerList:SetGridDataSource( f11_local3 )
|
||||
assert( f11_arg0.bindButton )
|
||||
f11_arg0.bindButton:addEventHandler( "button_start", function ( f20_arg0, f20_arg1 )
|
||||
local f20_local0 = LUI.FlowManager.GetScopedData( f11_arg0 )
|
||||
f20_local0.optionsMenuOpened = true
|
||||
ACTIONS.OpenMenu( "OptionsMenu", true, f20_arg1.controller )
|
||||
ACTIONS.PlaySoundSetSound( f11_arg0, "selectAlt", false )
|
||||
end )
|
||||
|
||||
local f11_local4 = f11_arg0:Wait( 250 )
|
||||
f11_local4.onComplete = function ()
|
||||
return f0_local6( f11_arg0, f11_arg1 )
|
||||
end
|
||||
|
||||
Engine.StopMenuVideo()
|
||||
end
|
||||
|
||||
MenuBuilder.m_types["SystemLinkMenu"] = function ( menu, controller )
|
||||
local self = LUI.UIElement.new()
|
||||
self.id = "SystemLinkMenu"
|
||||
self._animationSets = {}
|
||||
self._sequences = {}
|
||||
local f22_local1 = controller and controller.controllerIndex
|
||||
if not f22_local1 and not Engine.InFrontend() then
|
||||
f22_local1 = self:getRootController()
|
||||
end
|
||||
assert( f22_local1 )
|
||||
self.soundSet = "cpMainMenuDefault"
|
||||
self:playSound( "menu_open" )
|
||||
local f22_local2 = self
|
||||
local f22_local3 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local3 = MenuBuilder.BuildRegisteredType( "CPMenuOuterMask", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
f22_local3.id = "OuterMaskTop"
|
||||
f22_local3:SetZRotation( -168, 0 )
|
||||
f22_local3:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -320, _1080p * 100 )
|
||||
self:addElement( f22_local3 )
|
||||
self.OuterMaskTop = f22_local3
|
||||
end
|
||||
local f22_local4 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local4 = MenuBuilder.BuildRegisteredType( "CPMenuOuterMask", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
f22_local4.id = "OuterMaskBottom"
|
||||
f22_local4:SetZRotation( -168, 0 )
|
||||
f22_local4:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -205, _1080p * 215 )
|
||||
self:addElement( f22_local4 )
|
||||
self.OuterMaskBottom = f22_local4
|
||||
end
|
||||
local f22_local5 = nil
|
||||
if CONDITIONS.IsCoreMultiplayer( self ) then
|
||||
f22_local5 = MenuBuilder.BuildRegisteredType( "MenuTitle", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
f22_local5.id = "MenuTitle"
|
||||
f22_local5.MenuTitle:setText( ToUpperCase( Engine.Localize( "SERVER BROWSER" ) ), 0 )
|
||||
f22_local5.MenuBreadcrumbs:setText( ToUpperCase( Engine.Localize( "EXE_LOCAL_PLAY" ) ), 0 )
|
||||
f22_local5.Icon:SetTop( _1080p * -28.5, 0 )
|
||||
f22_local5.Icon:SetBottom( _1080p * 61.5, 0 )
|
||||
f22_local5:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 96, _1080p * 1056, _1080p * 54, _1080p * 134 )
|
||||
self:addElement( f22_local5 )
|
||||
self.MenuTitle = f22_local5
|
||||
end
|
||||
local ButtonHelperBar = nil
|
||||
|
||||
ButtonHelperBar = MenuBuilder.BuildRegisteredType( "ButtonHelperBar", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
ButtonHelperBar.id = "ButtonHelperBar"
|
||||
ButtonHelperBar:SetAnchorsAndPosition( 0, 0, 1, 0, 0, 0, _1080p * -85, 0 )
|
||||
self:addElement( ButtonHelperBar )
|
||||
self.ButtonHelperBar = ButtonHelperBar
|
||||
|
||||
local SocialFeed = nil
|
||||
|
||||
SocialFeed = MenuBuilder.BuildRegisteredType( "SocialFeed", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
SocialFeed.id = "SocialFeed"
|
||||
SocialFeed:SetAnchorsAndPosition( 0, 0, 1, 0, 0, 0, _1080p * -115, _1080p * -85 )
|
||||
self:addElement( SocialFeed )
|
||||
self.SocialFeed = SocialFeed
|
||||
|
||||
local SystemLinkMenuButtons = nil
|
||||
|
||||
SystemLinkMenuButtons = MenuBuilder.BuildRegisteredType( "SystemLinkMenuButtons", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
SystemLinkMenuButtons.id = "SystemLinkMenuButtons"
|
||||
SystemLinkMenuButtons:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 630, _1080p * 216, _1080p * 438 )
|
||||
self:addElement( SystemLinkMenuButtons )
|
||||
self.SystemLinkMenuButtons = SystemLinkMenuButtons
|
||||
|
||||
local f22_local9 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local9 = MenuBuilder.BuildRegisteredType( "LobbyMembers", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
f22_local9.id = "LobbyMembers"
|
||||
f22_local9:SetAlpha( 0, 0 )
|
||||
f22_local9:SetAnchorsAndPosition( 1, 0, 0, 1, _1080p * -1790, _1080p * -1090, _1080p * 791.5, _1080p * 1435.5 )
|
||||
self:addElement( f22_local9 )
|
||||
self.LobbyMembers = f22_local9
|
||||
end
|
||||
local ServerBrowser = nil
|
||||
|
||||
ServerBrowser = MenuBuilder.BuildRegisteredType( "ServerBrowser", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
ServerBrowser.id = "ServerBrowser"
|
||||
ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 659, _1080p * 1790, _1080p * 216, _1080p * 885 )
|
||||
self:addElement( ServerBrowser )
|
||||
self.ServerBrowser = ServerBrowser
|
||||
|
||||
local f22_local11 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local11 = LUI.UIImage.new()
|
||||
f22_local11.id = "BloodSplat"
|
||||
f22_local11:SetAlpha( 0.5, 0 )
|
||||
f22_local11:setImage( RegisterMaterial( "cp_menu_zombies_blood_splats_large" ), 0 )
|
||||
f22_local11:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 48, _1080p * 678, _1080p * -71, _1080p * 441 )
|
||||
self:addElement( f22_local11 )
|
||||
self.BloodSplat = f22_local11
|
||||
end
|
||||
local f22_local12 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local12 = LUI.UIImage.new()
|
||||
f22_local12.id = "ZombiesLogo"
|
||||
f22_local12:setImage( RegisterMaterial( "cp_menu_zombies_logo" ), 0 )
|
||||
f22_local12:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 60, _1080p * 740, _1080p * 34, _1080p * 434 )
|
||||
self:addElement( f22_local12 )
|
||||
self.ZombiesLogo = f22_local12
|
||||
end
|
||||
local f22_local13 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local13 = LUI.UIStyledText.new()
|
||||
f22_local13.id = "ZomLanPartyShadow"
|
||||
f22_local13:SetRGBFromInt( 0, 0 )
|
||||
f22_local13:setText( Engine.Localize( "PLATFORM_SYSTEM_LINK_CAPS" ), 0 )
|
||||
f22_local13:SetFontSize( 36 * _1080p )
|
||||
f22_local13:SetFont( FONTS.GetFont( FONTS.ZmClean.File ) )
|
||||
f22_local13:SetAlignment( LUI.Alignment.Center )
|
||||
f22_local13:SetOptOutRightToLeftAlignmentFlip( true )
|
||||
f22_local13:SetShadowRGBFromInt( 0, 0 )
|
||||
f22_local13:SetOutlineRGBFromInt( 0, 0 )
|
||||
f22_local13:SetDecodeLetterLength( 25 )
|
||||
f22_local13:SetDecodeMaxRandChars( 3 )
|
||||
f22_local13:SetDecodeUpdatesPerLetter( 4 )
|
||||
f22_local13:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 272, _1080p * 597.5, _1080p * 302, _1080p * 338 )
|
||||
self:addElement( f22_local13 )
|
||||
self.ZomLanPartyShadow = f22_local13
|
||||
end
|
||||
local f22_local14 = nil
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local14 = LUI.UIStyledText.new()
|
||||
f22_local14.id = "ZomLanParty"
|
||||
f22_local14:SetRGBFromInt( 14042667, 0 )
|
||||
f22_local14:setText( Engine.Localize( "PLATFORM_SYSTEM_LINK_CAPS" ), 0 )
|
||||
f22_local14:SetFontSize( 36 * _1080p )
|
||||
f22_local14:SetFont( FONTS.GetFont( FONTS.ZmClean.File ) )
|
||||
f22_local14:SetAlignment( LUI.Alignment.Center )
|
||||
f22_local14:SetOptOutRightToLeftAlignmentFlip( true )
|
||||
f22_local14:SetShadowRGBFromInt( 0, 0 )
|
||||
f22_local14:SetOutlineRGBFromInt( 0, 0 )
|
||||
f22_local14:SetDecodeLetterLength( 25 )
|
||||
f22_local14:SetDecodeMaxRandChars( 3 )
|
||||
f22_local14:SetDecodeUpdatesPerLetter( 4 )
|
||||
f22_local14:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 272, _1080p * 597.5, _1080p * 302, _1080p * 338 )
|
||||
self:addElement( f22_local14 )
|
||||
self.ZomLanParty = f22_local14
|
||||
end
|
||||
local MPLobbyMembersPlayercards = nil
|
||||
|
||||
MPLobbyMembersPlayercards = MenuBuilder.BuildRegisteredType( "MPLobbyMembersPlayercards", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
MPLobbyMembersPlayercards.id = "MPLobbyMembersPlayercards"
|
||||
MPLobbyMembersPlayercards:SetAnchorsAndPosition( 0, 1, 1, 0, _1080p * 130, _1080p * 630, _1080p * -255, _1080p * -189 )
|
||||
self:addElement( MPLobbyMembersPlayercards )
|
||||
self.MPLobbyMembersPlayercards = MPLobbyMembersPlayercards
|
||||
|
||||
local ButtonDescriptionText = nil
|
||||
|
||||
ButtonDescriptionText = MenuBuilder.BuildRegisteredType( "ButtonDescriptionText", {
|
||||
controllerIndex = f22_local1
|
||||
} )
|
||||
ButtonDescriptionText.id = "ButtonDescriptionText"
|
||||
ButtonDescriptionText:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 550, _1080p * 334, _1080p * 366 )
|
||||
self:addElement( ButtonDescriptionText )
|
||||
self.ButtonDescriptionText = ButtonDescriptionText
|
||||
|
||||
self._animationSets.DefaultAnimationSet = function ()
|
||||
ServerBrowser:RegisterAnimationSequence( "DefaultSequence", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 1, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 659, _1080p * 1790, _1080p * 216, _1080p * 885, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.DefaultSequence = function ()
|
||||
ServerBrowser:AnimateSequence( "DefaultSequence" )
|
||||
end
|
||||
|
||||
SystemLinkMenuButtons:RegisterAnimationSequence( "IntroCore", {
|
||||
{
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAlpha( 1, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 630, _1080p * 216, _1080p * 438, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
ServerBrowser:RegisterAnimationSequence( "IntroCore", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 1, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 659, _1080p * 1790, _1080p * 216, _1080p * 885, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.IntroCore = function ()
|
||||
SystemLinkMenuButtons:AnimateSequence( "IntroCore" )
|
||||
ServerBrowser:AnimateSequence( "IntroCore" )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
self._animationSets.ThirdGameModeAnimationSet = function ()
|
||||
self._sequences.DefaultSequence = function ()
|
||||
|
||||
end
|
||||
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local3:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAlpha( 0.6, 500, LUI.EASING.outBack )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -635, _1080p * -215, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -635, _1080p * -215, 500, LUI.EASING.outBack )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -320, _1080p * 100, 500, LUI.EASING.outQuadratic )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -320, _1080p * 100, 139 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -280, _1080p * 140, 9 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskTop:SetAnchorsAndPosition( 0, 0, 0, 1, _1080p * -190, _1080p * 76, _1080p * -320, _1080p * 100, 200, LUI.EASING.outQuadratic )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local4:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAlpha( 0.6, 500, LUI.EASING.outBack )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * 225, _1080p * 645, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * 225, _1080p * 645, 500, LUI.EASING.outBack )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -205, _1080p * 215, 500, LUI.EASING.outQuadratic )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -205, _1080p * 215, 139 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -245, _1080p * 175, 9 )
|
||||
end,
|
||||
function ()
|
||||
return self.OuterMaskBottom:SetAnchorsAndPosition( 0, 0, 1, 0, _1080p * -83, _1080p * 183, _1080p * -205, _1080p * 215, 200, LUI.EASING.outQuadratic )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
SystemLinkMenuButtons:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAlpha( 0, 1220 )
|
||||
end,
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAlpha( 1, 490 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.SystemLinkMenuButtons:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 130, _1080p * 630, _1080p * 406, _1080p * 628, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local9:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.LobbyMembers:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.LobbyMembers:SetAlpha( 0, 2000 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
ServerBrowser:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 0, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 789, _1080p * 1920, _1080p * 133, _1080p * 802, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local11:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0, 140 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0.5, 10 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0.5, 200, LUI.EASING.outQuadratic )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAlpha( 0.4, 650, LUI.EASING.outQuadratic )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.BloodSplat:SetZRotation( -5, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetZRotation( -5, 150 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetZRotation( 0, 850, LUI.EASING.outQuadratic )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.BloodSplat:playSound( "splat", false, 1150 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.BloodSplat:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 218.92, _1080p * 547.08, _1080p * 51.65, _1080p * 318.35, 1149 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 88, _1080p * 718, _1080p * -71, _1080p * 441, 70 )
|
||||
end,
|
||||
function ()
|
||||
return self.BloodSplat:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 80, _1080p * 710, _1080p * -71, _1080p * 441, 129, LUI.EASING.outQuadratic )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local12:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAlpha( 0, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAlpha( 1, 150 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ZombiesLogo:SetZRotation( 5, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetZRotation( 5, 150 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetZRotation( 0, 850, LUI.EASING.outQuadratic )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * -429.8, _1080p * 1249.8, _1080p * -260, _1080p * 728, 1000 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 80, _1080p * 720, _1080p * 51.65, _1080p * 416.35, 149 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70, _1080p * 750, _1080p * 34, _1080p * 434, 200 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70, _1080p * 750, _1080p * 36, _1080p * 436, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 68, _1080p * 748, _1080p * 35.68, _1080p * 435.68, 50 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70.35, _1080p * 750.35, _1080p * 33.39, _1080p * 433.39, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70.28, _1080p * 750.28, _1080p * 31.51, _1080p * 431.51, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 68.22, _1080p * 748.22, _1080p * 34.03, _1080p * 434.03, 50 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70.64, _1080p * 750.64, _1080p * 34.02, _1080p * 434.02, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70.47, _1080p * 750.47, _1080p * 36.01, _1080p * 436.01, 50 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 68.33, _1080p * 748.33, _1080p * 35.4, _1080p * 435.4, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 68.93, _1080p * 748.93, _1080p * 32.9, _1080p * 432.9, 59 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 69.4, _1080p * 749.4, _1080p * 35.38, _1080p * 435.38, 40 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 69.73, _1080p * 749.73, _1080p * 36.61, _1080p * 436.61, 49 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 71.93, _1080p * 751.93, _1080p * 34.65, _1080p * 434.65, 50 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZombiesLogo:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 70, _1080p * 750, _1080p * 34, _1080p * 434, 49, LUI.EASING.outQuadratic )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local13:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ZomLanPartyShadow:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZomLanPartyShadow:SetAlpha( 0, 1710 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZomLanPartyShadow:SetAlpha( 1, 290 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local14:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ZomLanParty:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZomLanParty:SetAlpha( 0, 1220 )
|
||||
end,
|
||||
function ()
|
||||
return self.ZomLanParty:SetAlpha( 1, 490 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ZomLanParty:SetRGBFromInt( 14042667, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
end
|
||||
MPLobbyMembersPlayercards:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.MPLobbyMembersPlayercards:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.MPLobbyMembersPlayercards:SetAlpha( 0, 700 )
|
||||
end,
|
||||
function ()
|
||||
return self.MPLobbyMembersPlayercards:SetAlpha( 0, 1010 )
|
||||
end,
|
||||
function ()
|
||||
return self.MPLobbyMembersPlayercards:SetAlpha( 1, 290 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
ButtonDescriptionText:RegisterAnimationSequence( "Intro", {
|
||||
{
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetAlpha( 0, 1220 )
|
||||
end,
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetAlpha( 1, 490 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetRGBFromTable( SWATCHES.text.primaryText, 0 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ButtonDescriptionText:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 132, _1080p * 552, _1080p * 524, _1080p * 556, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.Intro = function ()
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local3:AnimateSequence( "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local4:AnimateSequence( "Intro" )
|
||||
end
|
||||
SystemLinkMenuButtons:AnimateSequence( "Intro" )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local9:AnimateSequence( "Intro" )
|
||||
end
|
||||
ServerBrowser:AnimateSequence( "Intro" )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local11:AnimateSequence( "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local12:AnimateSequence( "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local13:AnimateSequence( "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
f22_local14:AnimateSequence( "Intro" )
|
||||
end
|
||||
MPLobbyMembersPlayercards:AnimateSequence( "Intro" )
|
||||
ButtonDescriptionText:AnimateSequence( "Intro" )
|
||||
end
|
||||
|
||||
ServerBrowser:RegisterAnimationSequence( "DisplayServerBrowser", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 0, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 1, 80 )
|
||||
end
|
||||
},
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAnchorsAndPosition( 0, 1, 0, 1, _1080p * 727, _1080p * 1858, _1080p * 216, _1080p * 885, 0 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.DisplayServerBrowser = function ()
|
||||
ServerBrowser:AnimateSequence( "DisplayServerBrowser" )
|
||||
end
|
||||
|
||||
ServerBrowser:RegisterAnimationSequence( "HideServerBrowser", {
|
||||
{
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 1, 0 )
|
||||
end,
|
||||
function ()
|
||||
return self.ServerBrowser:SetAlpha( 0, 80 )
|
||||
end
|
||||
}
|
||||
} )
|
||||
self._sequences.HideServerBrowser = function ()
|
||||
ServerBrowser:AnimateSequence( "HideServerBrowser" )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
self._animationSets.DefaultAnimationSet()
|
||||
self.addButtonHelperFunction = function ( f117_arg0, f117_arg1 )
|
||||
f117_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_SELECT" ),
|
||||
button_ref = "button_primary",
|
||||
side = "left",
|
||||
clickable = true
|
||||
} )
|
||||
f117_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_BACK" ),
|
||||
button_ref = "button_secondary",
|
||||
side = "left",
|
||||
priority = 1,
|
||||
clickable = true
|
||||
} )
|
||||
f117_arg0:AddButtonHelperText( {
|
||||
helper_text = Engine.Localize( "LUA_MENU_OPTIONS_CAPS" ),
|
||||
button_ref = "button_start",
|
||||
side = "left",
|
||||
priority = 4,
|
||||
clickable = true
|
||||
} )
|
||||
end
|
||||
|
||||
self:addEventHandler( "menu_create", self.addButtonHelperFunction )
|
||||
|
||||
local bindButton = LUI.UIBindButton.new()
|
||||
bindButton.id = "selfBindButton"
|
||||
self:addElement( bindButton )
|
||||
self.bindButton = bindButton
|
||||
|
||||
f0_local7( self, f22_local1, controller )
|
||||
ACTIONS.AnimateSequence( self, "DefaultSequence" )
|
||||
if CONDITIONS.IsThirdGameMode( self ) then
|
||||
ACTIONS.SetAnimationSet( self, "ThirdGameModeAnimationSet" )
|
||||
ACTIONS.AnimateSequence( self, "Intro" )
|
||||
end
|
||||
if CONDITIONS.IsCoreMultiplayer( self ) then
|
||||
ACTIONS.SetAnimationSet( self, "DefaultAnimationSet" )
|
||||
ACTIONS.AnimateSequence( self, "IntroCore" )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
LUI.FlowManager.RegisterStackPushBehaviour( "SystemLinkMenu", PushFunc )
|
||||
LUI.FlowManager.RegisterStackPopBehaviour( "SystemLinkMenu", f0_local3 )
|
||||
|
||||
|
||||
|
||||
|
||||
--- Menu Buttons ---
|
||||
function SystemLinkMenuButtons( menu, controller )
|
||||
local self = LUI.UIVerticalList.new()
|
||||
self:SetAnchorsAndPosition( 0, 1, 0, 1, 0, 500 * _1080p, 0, 300 * _1080p )
|
||||
self.id = "SystemLinkMenuButtons"
|
||||
local f1_local1 = controller and controller.controllerIndex
|
||||
if not f1_local1 and not Engine.InFrontend() then
|
||||
f1_local1 = self:getRootController()
|
||||
end
|
||||
assert( f1_local1 )
|
||||
local f1_local2 = self
|
||||
self:SetSpacing( 10 * _1080p )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
MenuBuilder.m_types["SystemLinkMenuButtons"] = SystemLinkMenuButtons
|
||||
require("ServerButtons")
|
||||
require("SysLinkBrowser")
|
@ -342,8 +342,10 @@ namespace ui_scripting
|
||||
}
|
||||
|
||||
const auto folder = globals.in_require_script.substr(0, globals.in_require_script.find_last_of("/\\"));
|
||||
const std::string name_ = name;
|
||||
const std::string target_script = folder + "/" + name_ + ".lua";
|
||||
std::string name_ = name;
|
||||
std::string name_noprefix = std::string(name_.begin() + 3, name_.end());
|
||||
|
||||
const std::string target_script = folder + "/" + name_noprefix;
|
||||
|
||||
if (utils::io::file_exists(target_script))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user