format2
This commit is contained in:
parent
7bc8ae7798
commit
25b070a106
@ -1,40 +1,40 @@
|
|||||||
local f0_local0 = function(f1_arg0, f1_arg1)
|
local f0_local0 = function(arg0, arg1)
|
||||||
Engine.Exec("xblive_privatematch 0")
|
Engine.Exec("xblive_privatematch 0")
|
||||||
utils.cp.AliensUtils.AliensRunConfig(f1_arg1.controller)
|
utils.cp.AliensUtils.AliensRunConfig(arg1.controller)
|
||||||
LUI.FlowManager.RequestAddMenu("SystemLinkMenu", false, f1_arg1.controller, false, {}, true)
|
LUI.FlowManager.RequestAddMenu("SystemLinkMenu", false, arg1.controller, false, {}, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local f0_local1 = function(f2_arg0, f2_arg1)
|
local f0_local1 = function(arg0, arg1)
|
||||||
f0_local0(f2_arg0, f2_arg1)
|
f0_local0(arg0, arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local f0_local2 = function(f3_arg0, f3_arg1)
|
local f0_local2 = function(arg0, arg1)
|
||||||
Engine.Exec(MPConfig.default_xboxlive, f3_arg1.controller)
|
Engine.Exec(MPConfig.default_xboxlive, arg1.controller)
|
||||||
Engine.SetDvarBool("xblive_privatematch", true)
|
Engine.SetDvarBool("xblive_privatematch", true)
|
||||||
SetIsAliensSolo(true)
|
SetIsAliensSolo(true)
|
||||||
Engine.SetDvarInt("party_maxplayers", 1)
|
Engine.SetDvarInt("party_maxplayers", 1)
|
||||||
Engine.Exec("xstartprivatematch")
|
Engine.Exec("xstartprivatematch")
|
||||||
LUI.FlowManager.RequestAddMenu("CPPrivateMatchMenu", false, f3_arg1.controller, false, {
|
LUI.FlowManager.RequestAddMenu("CPPrivateMatchMenu", false, arg1.controller, false, {
|
||||||
showPlayNowButton = true,
|
showPlayNowButton = true,
|
||||||
isPublicMatch = false
|
isPublicMatch = false
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local f0_local3 = function(f4_arg0, f4_arg1)
|
local f0_local3 = function(arg0, arg1)
|
||||||
Engine.Exec(MPConfig.default_xboxlive, f4_arg1.controller)
|
Engine.Exec(MPConfig.default_xboxlive, arg1.controller)
|
||||||
Engine.SetDvarBool("xblive_privatematch", true)
|
Engine.SetDvarBool("xblive_privatematch", true)
|
||||||
SetIsAliensSolo(false)
|
SetIsAliensSolo(false)
|
||||||
Engine.Exec("xstartprivatematch")
|
Engine.Exec("xstartprivatematch")
|
||||||
LUI.FlowManager.RequestAddMenu("CPPrivateMatchMenu", false, f4_arg1.controller, false, {
|
LUI.FlowManager.RequestAddMenu("CPPrivateMatchMenu", false, arg1.controller, false, {
|
||||||
showPlayNowButton = true,
|
showPlayNowButton = true,
|
||||||
isPublicMatch = false
|
isPublicMatch = false
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local f0_local4 = function(f5_arg0, f5_arg1, f5_arg2)
|
local f0_local4 = function(arg0, arg1, arg2)
|
||||||
assert(f5_arg0.PublicMatch)
|
assert(arg0.PublicMatch)
|
||||||
assert(f5_arg0.SoloMatch)
|
assert(arg0.SoloMatch)
|
||||||
assert(f5_arg0.CustomMatch)
|
assert(arg0.CustomMatch)
|
||||||
local f5_local0 = LUI.DataSourceInGlobalModel.new("frontEnd.lobby.areWeGameHost")
|
local f5_local0 = LUI.DataSourceInGlobalModel.new("frontEnd.lobby.areWeGameHost")
|
||||||
local f5_local1 = DataSources.frontEnd.lobby.memberCount
|
local f5_local1 = DataSources.frontEnd.lobby.memberCount
|
||||||
local f5_local2 = function()
|
local f5_local2 = function()
|
||||||
@ -43,37 +43,37 @@ local f0_local4 = function(f5_arg0, f5_arg1, f5_arg2)
|
|||||||
|
|
||||||
local f5_local3 = function()
|
local f5_local3 = function()
|
||||||
local f7_local0 = f5_local2()
|
local f7_local0 = f5_local2()
|
||||||
f5_arg0.PublicMatch:SetButtonDisabled(f7_local0)
|
arg0.PublicMatch:SetButtonDisabled(f7_local0)
|
||||||
f5_arg0.CustomMatch:SetButtonDisabled(f7_local0)
|
arg0.CustomMatch:SetButtonDisabled(f7_local0)
|
||||||
end
|
end
|
||||||
|
|
||||||
f5_arg0:SubscribeToModel(f5_local0:GetModel(f5_arg1), f5_local3)
|
arg0:SubscribeToModel(f5_local0:GetModel(arg1), f5_local3)
|
||||||
f5_arg0:SubscribeToModel(f5_local1:GetModel(f5_arg1), f5_local3)
|
arg0:SubscribeToModel(f5_local1:GetModel(arg1), f5_local3)
|
||||||
f5_arg0:SubscribeToModel(DataSources.frontEnd.lobby.isSolo:GetModel(f5_arg1), function()
|
arg0:SubscribeToModel(DataSources.frontEnd.lobby.isSolo:GetModel(arg1), function()
|
||||||
local f8_local0 = DataSources.frontEnd.lobby.isSolo:GetValue(f5_arg1)
|
local f8_local0 = DataSources.frontEnd.lobby.isSolo:GetValue(arg1)
|
||||||
if f8_local0 ~= nil then
|
if f8_local0 ~= nil then
|
||||||
f5_arg0.SoloMatch:SetButtonDisabled(not f8_local0)
|
arg0.SoloMatch:SetButtonDisabled(not f8_local0)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
f5_arg0.PublicMatch:addEventHandler("button_action", f0_local1)
|
arg0.PublicMatch:addEventHandler("button_action", f0_local1)
|
||||||
f5_arg0.SoloMatch:addEventHandler("button_action", f0_local2)
|
arg0.SoloMatch:addEventHandler("button_action", f0_local2)
|
||||||
f5_arg0.Loadout:addEventHandler("button_action", function(f9_arg0, f9_arg1)
|
arg0.Loadout:addEventHandler("button_action", function(f9_arg0, f9_arg1)
|
||||||
LUI.FlowManager.RequestAddMenu("CPLoadoutMenu", true, f9_arg1.controller)
|
LUI.FlowManager.RequestAddMenu("CPLoadoutMenu", true, f9_arg1.controller)
|
||||||
end)
|
end)
|
||||||
f5_arg0.Barracks:addEventHandler("button_action", function(f10_arg0, f10_arg1)
|
arg0.Barracks:addEventHandler("button_action", function(f10_arg0, f10_arg1)
|
||||||
LUI.FlowManager.RequestAddMenu("Headquarters", true, f10_arg1.controller)
|
LUI.FlowManager.RequestAddMenu("Headquarters", true, f10_arg1.controller)
|
||||||
end)
|
end)
|
||||||
f5_arg0.Armory:addEventHandler("button_action", function(f11_arg0, f11_arg1)
|
arg0.Armory:addEventHandler("button_action", function(f11_arg0, f11_arg1)
|
||||||
if not Engine.IsUserAGuest(f11_arg1.controller) then
|
if not Engine.IsUserAGuest(f11_arg1.controller) then
|
||||||
ACTIONS.OpenMenu("Armory", true, f11_arg1.controller)
|
ACTIONS.OpenMenu("Armory", true, f11_arg1.controller)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
f5_arg0.CustomMatch:addEventHandler("button_action", f0_local3)
|
arg0.CustomMatch:addEventHandler("button_action", f0_local3)
|
||||||
f5_arg0.ContractsButton:addEventHandler("button_action", function(f12_arg0, f12_arg1)
|
arg0.ContractsButton:addEventHandler("button_action", function(f12_arg0, f12_arg1)
|
||||||
ACTIONS.OpenMenu("ContractMenu", true, f12_arg1.controller or f5_arg1)
|
ACTIONS.OpenMenu("ContractMenu", true, f12_arg1.controller or arg1)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
f5_arg0.ModsButton:addEventHandler("button_action", function(arg0, arg1)
|
arg0.ModsButton:addEventHandler("button_action", function(arg0, arg1)
|
||||||
LUI.FlowManager.RequestAddMenu("ModSelectMenu", true, arg1.controller, false)
|
LUI.FlowManager.RequestAddMenu("ModSelectMenu", true, arg1.controller, false)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@ -82,16 +82,16 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local VNavigator = LUI.UIVerticalNavigator.new()
|
local VNavigator = LUI.UIVerticalNavigator.new()
|
||||||
VNavigator:SetAnchorsAndPosition(0, 1, 0, 1, 0, 500 * _1080p, 0, 400 * _1080p)
|
VNavigator:SetAnchorsAndPosition(0, 1, 0, 1, 0, 500 * _1080p, 0, 400 * _1080p)
|
||||||
VNavigator.id = "CPMainMenuButtons"
|
VNavigator.id = "CPMainMenuButtons"
|
||||||
local f14_local1 = controller and controller.controllerIndex
|
local controllerIndex = controller and controller.controllerIndex
|
||||||
if not f14_local1 and not Engine.InFrontend() then
|
if not controllerIndex and not Engine.InFrontend() then
|
||||||
f14_local1 = VNavigator:getRootController()
|
controllerIndex = VNavigator:getRootController()
|
||||||
end
|
end
|
||||||
assert(f14_local1)
|
assert(controllerIndex)
|
||||||
local f14_local2 = VNavigator
|
|
||||||
local ButtonDescription = nil
|
local ButtonDescription = nil
|
||||||
|
|
||||||
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
|
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ButtonDescription.id = "ButtonDescription"
|
ButtonDescription.id = "ButtonDescription"
|
||||||
ButtonDescription:SetRGBFromTable(SWATCHES.genericButton.textDisabled, 0)
|
ButtonDescription:SetRGBFromTable(SWATCHES.genericButton.textDisabled, 0)
|
||||||
@ -103,7 +103,7 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local PublicMatch = nil
|
local PublicMatch = nil
|
||||||
|
|
||||||
PublicMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
|
PublicMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
PublicMatch.id = "PublicMatch"
|
PublicMatch.id = "PublicMatch"
|
||||||
PublicMatch.buttonDescription = "Browse for Custom Servers"
|
PublicMatch.buttonDescription = "Browse for Custom Servers"
|
||||||
@ -115,7 +115,7 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local SoloMatch = nil
|
local SoloMatch = nil
|
||||||
|
|
||||||
SoloMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
|
SoloMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
SoloMatch.id = "SoloMatch"
|
SoloMatch.id = "SoloMatch"
|
||||||
SoloMatch.buttonDescription = Engine.Localize("LUA_MENU_ZM_SOLO_MATCH_DESC")
|
SoloMatch.buttonDescription = Engine.Localize("LUA_MENU_ZM_SOLO_MATCH_DESC")
|
||||||
@ -127,7 +127,7 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local CustomMatch = nil
|
local CustomMatch = nil
|
||||||
|
|
||||||
CustomMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
|
CustomMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
CustomMatch.id = "CustomMatch"
|
CustomMatch.id = "CustomMatch"
|
||||||
CustomMatch.buttonDescription = Engine.Localize("LUA_MENU_ZM_CUSTOM_MATCH_DESC")
|
CustomMatch.buttonDescription = Engine.Localize("LUA_MENU_ZM_CUSTOM_MATCH_DESC")
|
||||||
@ -139,7 +139,7 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local Loadout = nil
|
local Loadout = nil
|
||||||
|
|
||||||
Loadout = MenuBuilder.BuildRegisteredType("MenuButton", {
|
Loadout = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
Loadout.id = "Loadout"
|
Loadout.id = "Loadout"
|
||||||
Loadout.buttonDescription = Engine.Localize("LUA_MENU_ZM_LOADOUT_DESC")
|
Loadout.buttonDescription = Engine.Localize("LUA_MENU_ZM_LOADOUT_DESC")
|
||||||
@ -151,7 +151,7 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local Barracks = nil
|
local Barracks = nil
|
||||||
|
|
||||||
Barracks = MenuBuilder.BuildRegisteredType("MenuButton", {
|
Barracks = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
Barracks.id = "Barracks"
|
Barracks.id = "Barracks"
|
||||||
Barracks.buttonDescription = Engine.Localize("LUA_MENU_ZM_BARRACKS_DESC")
|
Barracks.buttonDescription = Engine.Localize("LUA_MENU_ZM_BARRACKS_DESC")
|
||||||
@ -163,7 +163,7 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local Armory = nil
|
local Armory = nil
|
||||||
|
|
||||||
Armory = MenuBuilder.BuildRegisteredType("MenuButton", {
|
Armory = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
Armory.id = "Armory"
|
Armory.id = "Armory"
|
||||||
Armory.buttonDescription = Engine.Localize("LUA_MENU_ZM_SURVIVAL_DEPOT_DESC")
|
Armory.buttonDescription = Engine.Localize("LUA_MENU_ZM_SURVIVAL_DEPOT_DESC")
|
||||||
@ -175,7 +175,7 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local ModsButton = nil
|
local ModsButton = nil
|
||||||
|
|
||||||
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ModsButton.id = "ModsButton"
|
ModsButton.id = "ModsButton"
|
||||||
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
|
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
|
||||||
@ -187,14 +187,14 @@ function CPMainMenuButtons(menu, controller)
|
|||||||
local ContractsButton = nil
|
local ContractsButton = nil
|
||||||
|
|
||||||
ContractsButton = MenuBuilder.BuildRegisteredType("ContractsButtonCP", {
|
ContractsButton = MenuBuilder.BuildRegisteredType("ContractsButtonCP", {
|
||||||
controllerIndex = f14_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ContractsButton.id = "ContractsButton"
|
ContractsButton.id = "ContractsButton"
|
||||||
ContractsButton:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 340, _1080p * 280, _1080p * 340)
|
ContractsButton:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 340, _1080p * 280, _1080p * 340)
|
||||||
VNavigator:addElement(ContractsButton)
|
VNavigator:addElement(ContractsButton)
|
||||||
VNavigator.ContractsButton = ContractsButton
|
VNavigator.ContractsButton = ContractsButton
|
||||||
|
|
||||||
f0_local4(VNavigator, f14_local1, controller)
|
f0_local4(VNavigator, controllerIndex, controller)
|
||||||
return VNavigator
|
return VNavigator
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local f0_local1 = function(f2_arg0)
|
local f0_local1 = function(arg0)
|
||||||
f2_arg0.ResumeButton:SetButtonDisabled(not Engine.CanResumeGame(f2_arg0._controllerIndex))
|
arg0.ResumeButton:SetButtonDisabled(not Engine.CanResumeGame(arg0._controllerIndex))
|
||||||
if not CONDITIONS.IsTrialLicense(f2_arg0) then
|
if not CONDITIONS.IsTrialLicense(arg0) then
|
||||||
local f2_local0 = f2_arg0.MissionSelectButton
|
local f2_local0 = arg0.MissionSelectButton
|
||||||
local f2_local1 = f2_local0
|
local f2_local1 = f2_local0
|
||||||
f2_local0 = f2_local0.SetButtonDisabled
|
f2_local0 = f2_local0.SetButtonDisabled
|
||||||
local f2_local2 = Engine.IsTrialLicense()
|
local f2_local2 = Engine.IsTrialLicense()
|
||||||
if not f2_local2 then
|
if not f2_local2 then
|
||||||
if not Engine.IsDevelopmentBuild() and not Engine.GetDvarBool("mis_cheat") then
|
if not Engine.IsDevelopmentBuild() and not Engine.GetDvarBool("mis_cheat") then
|
||||||
f2_local2 = not f0_local0(f2_arg0._controllerIndex)
|
f2_local2 = not f0_local0(arg0._controllerIndex)
|
||||||
else
|
else
|
||||||
f2_local2 = false
|
f2_local2 = false
|
||||||
end
|
end
|
||||||
@ -16,21 +16,7 @@ local f0_local1 = function(f2_arg0)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local f0_local2 = function(f3_arg0, f3_arg1)
|
local f0_local3 = function(arg0, arg1)
|
||||||
LUI.FlowManager.RequestPopupMenu(nil, "FakeLoadingScreenOverlay", true, 0, false, {
|
|
||||||
onLoadCompleteFunc = function()
|
|
||||||
Engine.SetDvarString("ui_char_museum_mode", "credits_1")
|
|
||||||
Engine.Exec("profile_difficultyLoad")
|
|
||||||
Engine.Exec("profile_specialistModeLoad")
|
|
||||||
Engine.Exec("profile_yoloModeLoad")
|
|
||||||
Engine.Exec("loadgame_continue")
|
|
||||||
Engine.Exec("updategamerprofile")
|
|
||||||
end
|
|
||||||
})
|
|
||||||
LUI.FlowManager.RequestLeaveMenu(f3_arg0)
|
|
||||||
end
|
|
||||||
|
|
||||||
local f0_local3 = function(f5_arg0, f5_arg1)
|
|
||||||
LUI.FlowManager.RequestPopupMenu(nil, "FakeLoadingScreenOverlay", true, 0, false, {
|
LUI.FlowManager.RequestPopupMenu(nil, "FakeLoadingScreenOverlay", true, 0, false, {
|
||||||
onLoadCompleteFunc = function()
|
onLoadCompleteFunc = function()
|
||||||
Engine.Exec("set ui_play_credits 1; map shipcrib_epilogue")
|
Engine.Exec("set ui_play_credits 1; map shipcrib_epilogue")
|
||||||
@ -38,47 +24,41 @@ local f0_local3 = function(f5_arg0, f5_arg1)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- MenuBuilder.registerType( "ResumeGamePopup", function ( f7_arg0, f7_arg1 )
|
local f0_local4 = function(arg0, arg1, arg2)
|
||||||
-- return MenuBuilder.BuildRegisteredType( "PopupYesNo", {
|
assert(arg0.ResumeButton)
|
||||||
-- message = Engine.Localize( "@MENU_RESUMEGAME_Q" ),
|
assert(arg0.NewButton)
|
||||||
-- yesAction = f0_local2
|
assert(arg0.CreditsButton)
|
||||||
-- } )
|
if not CONDITIONS.IsTrialLicense(arg0) then
|
||||||
-- end )
|
assert(arg0.MissionSelectButton)
|
||||||
local f0_local4 = function(f8_arg0, f8_arg1, f8_arg2)
|
|
||||||
assert(f8_arg0.ResumeButton)
|
|
||||||
assert(f8_arg0.NewButton)
|
|
||||||
assert(f8_arg0.CreditsButton)
|
|
||||||
if not CONDITIONS.IsTrialLicense(f8_arg0) then
|
|
||||||
assert(f8_arg0.MissionSelectButton)
|
|
||||||
end
|
end
|
||||||
f8_arg0._controllerIndex = f8_arg1
|
arg0._controllerIndex = arg1
|
||||||
f8_arg0.ResumeButton:addEventHandler("button_action", function(f9_arg0, f9_arg1)
|
arg0.ResumeButton:addEventHandler("button_action", function(f9_arg0, f9_arg1)
|
||||||
Engine.SetDvarString("start", "")
|
Engine.SetDvarString("start", "")
|
||||||
LUI.FlowManager.RequestPopupMenu(f9_arg0, "ResumeGamePopup", false, f9_arg1.controller, false)
|
LUI.FlowManager.RequestPopupMenu(f9_arg0, "ResumeGamePopup", false, f9_arg1.controller, false)
|
||||||
end)
|
end)
|
||||||
f8_arg0.NewButton:addEventHandler("button_action", function(f10_arg0, f10_arg1)
|
arg0.NewButton:addEventHandler("button_action", function(f10_arg0, f10_arg1)
|
||||||
Engine.SetDvarString("start", "")
|
Engine.SetDvarString("start", "")
|
||||||
if Engine.CanResumeGame(f8_arg1) then
|
if Engine.CanResumeGame(arg1) then
|
||||||
LUI.FlowManager.RequestPopupMenu(f8_arg0, "overwrite_warning_menu", true, f10_arg1.controller)
|
LUI.FlowManager.RequestPopupMenu(arg0, "overwrite_warning_menu", true, f10_arg1.controller)
|
||||||
else
|
else
|
||||||
LUI.FlowManager.RequestPopupMenu(f8_arg0, "popmenu_autosave_warning", true, f10_arg1.controller)
|
LUI.FlowManager.RequestPopupMenu(arg0, "popmenu_autosave_warning", true, f10_arg1.controller)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
if not CONDITIONS.IsTrialLicense(f8_arg0) then
|
if not CONDITIONS.IsTrialLicense(arg0) then
|
||||||
f8_arg0.MissionSelectButton:addEventHandler("button_action", function(f11_arg0, f11_arg1)
|
arg0.MissionSelectButton:addEventHandler("button_action", function(f11_arg0, f11_arg1)
|
||||||
Engine.SetDvarString("start", "")
|
Engine.SetDvarString("start", "")
|
||||||
LUI.FlowManager.RequestAddMenu("LevelSelectMenu", true, f11_arg1.controller, false)
|
LUI.FlowManager.RequestAddMenu("LevelSelectMenu", true, f11_arg1.controller, false)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
f8_arg0.CreditsButton:addEventHandler("button_action", f0_local3)
|
arg0.CreditsButton:addEventHandler("button_action", f0_local3)
|
||||||
f0_local1(f8_arg0)
|
f0_local1(arg0)
|
||||||
f8_arg0:addEventHandler("update_save_game_available_complete", f0_local1)
|
arg0:addEventHandler("update_save_game_available_complete", f0_local1)
|
||||||
if Engine.GetDvarFloat("r_filmGrainAtten") == 0.25 then
|
if Engine.GetDvarFloat("r_filmGrainAtten") == 0.25 then
|
||||||
Engine.SetDvarFloat("r_filmGrainAtten", 1)
|
Engine.SetDvarFloat("r_filmGrainAtten", 1)
|
||||||
Engine.ExecNow("profile_setFilmGrain " .. tostring(1), f8_arg1)
|
Engine.ExecNow("profile_setFilmGrain " .. tostring(1), arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
f8_arg0.ModsButton:addEventHandler("button_action", function(arg0, arg1)
|
arg0.ModsButton:addEventHandler("button_action", function(arg0, arg1)
|
||||||
LUI.FlowManager.RequestAddMenu("ModSelectMenu", true, arg1.controller, false)
|
LUI.FlowManager.RequestAddMenu("ModSelectMenu", true, arg1.controller, false)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@ -87,17 +67,17 @@ function CampaignMenuButtons(menu, controller)
|
|||||||
local self = LUI.UIVerticalList.new()
|
local self = LUI.UIVerticalList.new()
|
||||||
self:SetAnchorsAndPosition(0, 1, 0, 1, 0, 500 * _1080p, 0, 440 * _1080p)
|
self:SetAnchorsAndPosition(0, 1, 0, 1, 0, 500 * _1080p, 0, 440 * _1080p)
|
||||||
self.id = "CampaignMenuButtons"
|
self.id = "CampaignMenuButtons"
|
||||||
local f12_local1 = controller and controller.controllerIndex
|
local controllerIndex = controller and controller.controllerIndex
|
||||||
if not f12_local1 and not Engine.InFrontend() then
|
if not controllerIndex and not Engine.InFrontend() then
|
||||||
f12_local1 = self:getRootController()
|
controllerIndex = self:getRootController()
|
||||||
end
|
end
|
||||||
assert(f12_local1)
|
assert(controllerIndex)
|
||||||
local f12_local2 = self
|
|
||||||
self:SetSpacing(10 * _1080p)
|
self:SetSpacing(10 * _1080p)
|
||||||
|
|
||||||
local ResumeButton = nil
|
local ResumeButton = nil
|
||||||
|
|
||||||
ResumeButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
ResumeButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f12_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ResumeButton.id = "ResumeButton"
|
ResumeButton.id = "ResumeButton"
|
||||||
ResumeButton.buttonDescription = Engine.Localize("LUA_MENU_RESUME_GAME_DESC")
|
ResumeButton.buttonDescription = Engine.Localize("LUA_MENU_RESUME_GAME_DESC")
|
||||||
@ -109,7 +89,7 @@ function CampaignMenuButtons(menu, controller)
|
|||||||
local NewButton = nil
|
local NewButton = nil
|
||||||
|
|
||||||
NewButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
NewButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f12_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
NewButton.id = "NewButton"
|
NewButton.id = "NewButton"
|
||||||
NewButton.buttonDescription = Engine.Localize("LUA_MENU_NEW_GAME_DESC")
|
NewButton.buttonDescription = Engine.Localize("LUA_MENU_NEW_GAME_DESC")
|
||||||
@ -118,29 +98,24 @@ function CampaignMenuButtons(menu, controller)
|
|||||||
self:addElement(NewButton)
|
self:addElement(NewButton)
|
||||||
self.NewButton = NewButton
|
self.NewButton = NewButton
|
||||||
|
|
||||||
local f12_local5 = nil
|
local MissionSelectButton = nil
|
||||||
if not CONDITIONS.IsTrialLicense(self) then
|
if not CONDITIONS.IsTrialLicense(self) then
|
||||||
f12_local5 = MenuBuilder.BuildRegisteredType("MenuButton", {
|
MissionSelectButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f12_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
f12_local5.id = "MissionSelectButton"
|
MissionSelectButton.id = "MissionSelectButton"
|
||||||
if not CONDITIONS.IsTrialLicense(self) then
|
if not CONDITIONS.IsTrialLicense(self) then
|
||||||
|
MissionSelectButton.buttonDescription = Engine.Localize("LUA_MENU_MISSION_SELECT_DESC")
|
||||||
else
|
|
||||||
|
|
||||||
end
|
end
|
||||||
if not CONDITIONS.IsTrialLicense(self) then
|
MissionSelectButton.Text:setText(Engine.Localize("MENU_MISSION_SELECT_CAPS"), 0)
|
||||||
f12_local5.buttonDescription = Engine.Localize("LUA_MENU_MISSION_SELECT_DESC")
|
MissionSelectButton:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 80, _1080p * 110)
|
||||||
end
|
self:addElement(MissionSelectButton)
|
||||||
f12_local5.Text:setText(Engine.Localize("MENU_MISSION_SELECT_CAPS"), 0)
|
self.MissionSelectButton = MissionSelectButton
|
||||||
f12_local5:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 80, _1080p * 110)
|
|
||||||
self:addElement(f12_local5)
|
|
||||||
self.MissionSelectButton = f12_local5
|
|
||||||
end
|
end
|
||||||
local CreditsButton = nil
|
local CreditsButton = nil
|
||||||
|
|
||||||
CreditsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
CreditsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f12_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
CreditsButton.id = "CreditsButton"
|
CreditsButton.id = "CreditsButton"
|
||||||
CreditsButton.buttonDescription = Engine.Localize("LUA_MENU_CREDITS_DESC")
|
CreditsButton.buttonDescription = Engine.Localize("LUA_MENU_CREDITS_DESC")
|
||||||
@ -152,7 +127,7 @@ function CampaignMenuButtons(menu, controller)
|
|||||||
local ModsButton = nil
|
local ModsButton = nil
|
||||||
|
|
||||||
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f12_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ModsButton.id = "ModsButton"
|
ModsButton.id = "ModsButton"
|
||||||
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
|
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
|
||||||
@ -164,14 +139,14 @@ function CampaignMenuButtons(menu, controller)
|
|||||||
local ButtonDescription = nil
|
local ButtonDescription = nil
|
||||||
|
|
||||||
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
|
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
|
||||||
controllerIndex = f12_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ButtonDescription.id = "ButtonDescription"
|
ButtonDescription.id = "ButtonDescription"
|
||||||
ButtonDescription:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 504, _1080p * 200, _1080p * 300)
|
ButtonDescription:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 504, _1080p * 200, _1080p * 300)
|
||||||
self:addElement(ButtonDescription)
|
self:addElement(ButtonDescription)
|
||||||
self.ButtonDescription = ButtonDescription
|
self.ButtonDescription = ButtonDescription
|
||||||
|
|
||||||
f0_local4(self, f12_local1, controller)
|
f0_local4(self, controllerIndex, controller)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -127,15 +127,15 @@ function MPMainMenuButtons(menu, controller)
|
|||||||
local self = LUI.UIVerticalNavigator.new()
|
local self = LUI.UIVerticalNavigator.new()
|
||||||
self:SetAnchorsAndPosition(0, 1, 0, 1, 0, 500 * _1080p, 0, 190 * _1080p)
|
self:SetAnchorsAndPosition(0, 1, 0, 1, 0, 500 * _1080p, 0, 190 * _1080p)
|
||||||
self.id = "MPMainMenuButtons"
|
self.id = "MPMainMenuButtons"
|
||||||
local f11_local1 = controller and controller.controllerIndex
|
local controllerIndex = controller and controller.controllerIndex
|
||||||
if not f11_local1 and not Engine.InFrontend() then
|
if not controllerIndex and not Engine.InFrontend() then
|
||||||
f11_local1 = self:getRootController()
|
controllerIndex = self:getRootController()
|
||||||
end
|
end
|
||||||
assert(f11_local1)
|
assert(controllerIndex)
|
||||||
local ConquestButton = nil
|
local ConquestButton = nil
|
||||||
|
|
||||||
ConquestButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
ConquestButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f11_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ConquestButton.id = "ConquestButton"
|
ConquestButton.id = "ConquestButton"
|
||||||
ConquestButton.buttonDescription = Engine.Localize("LUA_MENU_PUBLIC_MATCH_DESC")
|
ConquestButton.buttonDescription = Engine.Localize("LUA_MENU_PUBLIC_MATCH_DESC")
|
||||||
@ -147,7 +147,7 @@ function MPMainMenuButtons(menu, controller)
|
|||||||
local MLGGameBattlesButton = nil
|
local MLGGameBattlesButton = nil
|
||||||
if CONDITIONS.IsGameBattlesAllowed(self) then
|
if CONDITIONS.IsGameBattlesAllowed(self) then
|
||||||
MLGGameBattlesButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
MLGGameBattlesButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f11_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
MLGGameBattlesButton.id = "MLGGameBattlesButton"
|
MLGGameBattlesButton.id = "MLGGameBattlesButton"
|
||||||
if CONDITIONS.IsGameBattlesAllowed(self) then
|
if CONDITIONS.IsGameBattlesAllowed(self) then
|
||||||
@ -167,7 +167,7 @@ function MPMainMenuButtons(menu, controller)
|
|||||||
local CustomGameButton = nil
|
local CustomGameButton = nil
|
||||||
|
|
||||||
CustomGameButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
CustomGameButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f11_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
CustomGameButton.id = "CustomGameButton"
|
CustomGameButton.id = "CustomGameButton"
|
||||||
CustomGameButton.buttonDescription = Engine.Localize("LUA_MENU_CUSTOM_GAME_DESC")
|
CustomGameButton.buttonDescription = Engine.Localize("LUA_MENU_CUSTOM_GAME_DESC")
|
||||||
@ -179,7 +179,7 @@ function MPMainMenuButtons(menu, controller)
|
|||||||
local ModsButton = nil
|
local ModsButton = nil
|
||||||
|
|
||||||
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f11_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ModsButton.id = "ModsButton"
|
ModsButton.id = "ModsButton"
|
||||||
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
|
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
|
||||||
@ -188,20 +188,20 @@ function MPMainMenuButtons(menu, controller)
|
|||||||
self:addElement(ModsButton)
|
self:addElement(ModsButton)
|
||||||
self.ModsButton = ModsButton
|
self.ModsButton = ModsButton
|
||||||
|
|
||||||
local f11_local6 = nil
|
local StoreButton = nil
|
||||||
if CONDITIONS.IsStoreAllowed(self) then
|
if CONDITIONS.IsStoreAllowed(self) then
|
||||||
f11_local6 = MenuBuilder.BuildRegisteredType("MenuButton", {
|
StoreButton = MenuBuilder.BuildRegisteredType("MenuButton", {
|
||||||
controllerIndex = f11_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
f11_local6.id = "StoreButton"
|
StoreButton.id = "StoreButton"
|
||||||
f11_local6.buttonDescription = Engine.Localize("LUA_MENU_STORE_DESC")
|
StoreButton.buttonDescription = Engine.Localize("LUA_MENU_STORE_DESC")
|
||||||
f11_local6.Text:setText(Engine.Localize("LUA_MENU_STORE_CAPS"), 0)
|
StoreButton.Text:setText(Engine.Localize("LUA_MENU_STORE_CAPS"), 0)
|
||||||
f11_local6:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 160, _1080p * 190)
|
StoreButton:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 160, _1080p * 190)
|
||||||
self:addElement(f11_local6)
|
self:addElement(StoreButton)
|
||||||
self.StoreButton = f11_local6
|
self.StoreButton = StoreButton
|
||||||
end
|
end
|
||||||
|
|
||||||
f0_local3(self, f11_local1, controller)
|
f0_local3(self, controllerIndex, controller)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
local f0_local0 = function(f1_arg0, f1_arg1, f1_arg2)
|
local f0_local0 = function(arg0, arg1, arg2)
|
||||||
assert(f1_arg0.CreateAClassButton)
|
assert(arg0.CreateAClassButton)
|
||||||
assert(f1_arg0.MissionSelect)
|
assert(arg0.MissionSelect)
|
||||||
local f1_local0 = LUI.DataSourceInGlobalModel.new("frontEnd.lobby.findMatchButtonWaitStatus")
|
local f1_local0 = LUI.DataSourceInGlobalModel.new("frontEnd.lobby.findMatchButtonWaitStatus")
|
||||||
f1_arg0:SubscribeToModel(f1_local0:GetModel(f1_arg1), function()
|
arg0:SubscribeToModel(f1_local0:GetModel(arg1), function()
|
||||||
local f2_local0 = f1_local0:GetValue(f1_arg1)
|
local f2_local0 = f1_local0:GetValue(arg1)
|
||||||
local f2_local1 = "Browse for Custom Servers"
|
local f2_local1 = "Browse for Custom Servers"
|
||||||
if f2_local0 == "" then
|
if f2_local0 == "" then
|
||||||
f1_arg0.MissionSelect:SetButtonDisabled(false)
|
arg0.MissionSelect:SetButtonDisabled(false)
|
||||||
else
|
else
|
||||||
f1_arg0.MissionSelect:SetButtonDisabled(true)
|
arg0.MissionSelect:SetButtonDisabled(true)
|
||||||
f2_local1 = f2_local0
|
f2_local1 = f2_local0
|
||||||
end
|
end
|
||||||
f1_arg0.MissionSelect.buttonDescription = f2_local1
|
arg0.MissionSelect.buttonDescription = f2_local1
|
||||||
f1_arg0.ButtonDescription:processEvent({
|
arg0.ButtonDescription:processEvent({
|
||||||
name = "update_button_description",
|
name = "update_button_description",
|
||||||
text = f2_local1
|
text = f2_local1
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
if not Onboarding.RigTutorial:WasCompleted(f1_arg1) then
|
if not Onboarding.RigTutorial:WasCompleted(arg1) then
|
||||||
f1_arg0.CreateAClassButton.listDefaultFocus = 0
|
arg0.CreateAClassButton.listDefaultFocus = 0
|
||||||
end
|
end
|
||||||
if not CONDITIONS.IsQuarterMasterAllowed(f1_arg0) then
|
if not CONDITIONS.IsQuarterMasterAllowed(arg0) then
|
||||||
f1_arg0.Barracks:SetAnchorsAndPosition(0, 0, 0, 1, 0, 0, _1080p * 120, _1080p * 150)
|
arg0.Barracks:SetAnchorsAndPosition(0, 0, 0, 1, 0, 0, _1080p * 120, _1080p * 150)
|
||||||
f1_arg0.ButtonDescription:SetAnchorsAndPosition(0, 0, 0, 1, 0, 0, _1080p * 160, _1080p * 190)
|
arg0.ButtonDescription:SetAnchorsAndPosition(0, 0, 0, 1, 0, 0, _1080p * 160, _1080p * 190)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -32,17 +32,17 @@ function MissionsVerticalLayout(menu, controller)
|
|||||||
self.id = "MissionsVerticalLayout"
|
self.id = "MissionsVerticalLayout"
|
||||||
self._animationSets = {}
|
self._animationSets = {}
|
||||||
self._sequences = {}
|
self._sequences = {}
|
||||||
local f3_local1 = controller and controller.controllerIndex
|
local controllerIndex = controller and controller.controllerIndex
|
||||||
if not f3_local1 and not Engine.InFrontend() then
|
if not controllerIndex and not Engine.InFrontend() then
|
||||||
f3_local1 = self:getRootController()
|
controllerIndex = self:getRootController()
|
||||||
end
|
end
|
||||||
assert(f3_local1)
|
assert(controllerIndex)
|
||||||
local f3_local2 = self
|
|
||||||
self:SetSpacing(10 * _1080p)
|
self:SetSpacing(10 * _1080p)
|
||||||
local MissionSelect = nil
|
local MissionSelect = nil
|
||||||
|
|
||||||
MissionSelect = MenuBuilder.BuildRegisteredType("GenericButton", {
|
MissionSelect = MenuBuilder.BuildRegisteredType("GenericButton", {
|
||||||
controllerIndex = f3_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
MissionSelect.id = "MissionSelect"
|
MissionSelect.id = "MissionSelect"
|
||||||
MissionSelect.buttonDescription = "Browse for Custom Servers"
|
MissionSelect.buttonDescription = "Browse for Custom Servers"
|
||||||
@ -54,7 +54,7 @@ function MissionsVerticalLayout(menu, controller)
|
|||||||
local MissionTeams = nil
|
local MissionTeams = nil
|
||||||
|
|
||||||
MissionTeams = MenuBuilder.BuildRegisteredType("GenericButton", {
|
MissionTeams = MenuBuilder.BuildRegisteredType("GenericButton", {
|
||||||
controllerIndex = f3_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
MissionTeams.id = "MissionTeams"
|
MissionTeams.id = "MissionTeams"
|
||||||
MissionTeams.buttonDescription = Engine.Localize("LUA_MENU_DESC_MISSION_TEAMS")
|
MissionTeams.buttonDescription = Engine.Localize("LUA_MENU_DESC_MISSION_TEAMS")
|
||||||
@ -66,7 +66,7 @@ function MissionsVerticalLayout(menu, controller)
|
|||||||
local CreateAClassButton = nil
|
local CreateAClassButton = nil
|
||||||
|
|
||||||
CreateAClassButton = MenuBuilder.BuildRegisteredType("CreateAClassButton", {
|
CreateAClassButton = MenuBuilder.BuildRegisteredType("CreateAClassButton", {
|
||||||
controllerIndex = f3_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
CreateAClassButton.id = "CreateAClassButton"
|
CreateAClassButton.id = "CreateAClassButton"
|
||||||
CreateAClassButton:SetAnchorsAndPosition(0, 0, 0, 1, 0, _1080p * -4, _1080p * 80, _1080p * 110)
|
CreateAClassButton:SetAnchorsAndPosition(0, 0, 0, 1, 0, _1080p * -4, _1080p * 80, _1080p * 110)
|
||||||
@ -76,7 +76,7 @@ function MissionsVerticalLayout(menu, controller)
|
|||||||
local f3_local6 = nil
|
local f3_local6 = nil
|
||||||
if CONDITIONS.IsQuarterMasterAllowed(self) then
|
if CONDITIONS.IsQuarterMasterAllowed(self) then
|
||||||
f3_local6 = MenuBuilder.BuildRegisteredType("QuartermasterButton", {
|
f3_local6 = MenuBuilder.BuildRegisteredType("QuartermasterButton", {
|
||||||
controllerIndex = f3_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
f3_local6.id = "Armory"
|
f3_local6.id = "Armory"
|
||||||
f3_local6:SetAnchorsAndPosition(0, 0, 0, 1, 0, _1080p * -4, _1080p * 120, _1080p * 150)
|
f3_local6:SetAnchorsAndPosition(0, 0, 0, 1, 0, _1080p * -4, _1080p * 120, _1080p * 150)
|
||||||
@ -86,7 +86,7 @@ function MissionsVerticalLayout(menu, controller)
|
|||||||
local Barracks = nil
|
local Barracks = nil
|
||||||
|
|
||||||
Barracks = MenuBuilder.BuildRegisteredType("BarracksButton", {
|
Barracks = MenuBuilder.BuildRegisteredType("BarracksButton", {
|
||||||
controllerIndex = f3_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
Barracks.id = "Barracks"
|
Barracks.id = "Barracks"
|
||||||
Barracks:SetAnchorsAndPosition(0, 0, 0, 1, 0, _1080p * -4, _1080p * 160, _1080p * 190)
|
Barracks:SetAnchorsAndPosition(0, 0, 0, 1, 0, _1080p * -4, _1080p * 160, _1080p * 190)
|
||||||
@ -96,7 +96,7 @@ function MissionsVerticalLayout(menu, controller)
|
|||||||
local f3_local8 = nil
|
local f3_local8 = nil
|
||||||
if CONDITIONS.AreContractsEnabled(self) then
|
if CONDITIONS.AreContractsEnabled(self) then
|
||||||
f3_local8 = MenuBuilder.BuildRegisteredType("ContractsButton", {
|
f3_local8 = MenuBuilder.BuildRegisteredType("ContractsButton", {
|
||||||
controllerIndex = f3_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
f3_local8.id = "Contracts"
|
f3_local8.id = "Contracts"
|
||||||
f3_local8:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 200, _1080p * 260)
|
f3_local8:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 200, _1080p * 260)
|
||||||
@ -106,7 +106,7 @@ function MissionsVerticalLayout(menu, controller)
|
|||||||
local ButtonDescription = nil
|
local ButtonDescription = nil
|
||||||
|
|
||||||
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
|
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
|
||||||
controllerIndex = f3_local1
|
controllerIndex = controllerIndex
|
||||||
})
|
})
|
||||||
ButtonDescription.id = "ButtonDescription"
|
ButtonDescription.id = "ButtonDescription"
|
||||||
ButtonDescription.Description:SetRight(_1080p * 415, 0)
|
ButtonDescription.Description:SetRight(_1080p * 415, 0)
|
||||||
@ -147,13 +147,13 @@ function MissionsVerticalLayout(menu, controller)
|
|||||||
|
|
||||||
self._animationSets.DefaultAnimationSet()
|
self._animationSets.DefaultAnimationSet()
|
||||||
MissionSelect:addEventHandler("button_action", function(f11_arg0, f11_arg1)
|
MissionSelect:addEventHandler("button_action", function(f11_arg0, f11_arg1)
|
||||||
local f11_local0 = f11_arg1.controller or f3_local1
|
local f11_local0 = f11_arg1.controller or controllerIndex
|
||||||
ACTIONS.OpenMenu("SystemLinkMenu", true, f11_local0)
|
ACTIONS.OpenMenu("SystemLinkMenu", true, f11_local0)
|
||||||
end)
|
end)
|
||||||
MissionTeams:addEventHandler("button_action", function(f12_arg0, f12_arg1)
|
MissionTeams:addEventHandler("button_action", function(f12_arg0, f12_arg1)
|
||||||
ACTIONS.OpenMenu("MissionTeamSelect", true, f12_arg1.controller or f3_local1)
|
ACTIONS.OpenMenu("MissionTeamSelect", true, f12_arg1.controller or controllerIndex)
|
||||||
end)
|
end)
|
||||||
f0_local0(self, f3_local1, controller)
|
f0_local0(self, controllerIndex, controller)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -10,14 +10,14 @@ local function PostLoadFunc(buttonElement, controllerIndex, controller)
|
|||||||
local dataSource = buttonElement:GetDataSource()
|
local dataSource = buttonElement:GetDataSource()
|
||||||
dataSource.buttonOnHoverFunction(hoveredElement, eventArgs)
|
dataSource.buttonOnHoverFunction(hoveredElement, eventArgs)
|
||||||
dataSource = buttonElement:GetDataSource()
|
dataSource = buttonElement:GetDataSource()
|
||||||
dataSource = dataSource.levelName
|
dataSource = dataSource.modName
|
||||||
end)
|
end)
|
||||||
|
|
||||||
buttonElement.GenericButton:addEventHandler("button_up", function(unhoveredElement, eventArgs)
|
buttonElement.GenericButton:addEventHandler("button_up", function(unhoveredElement, eventArgs)
|
||||||
local dataSource = buttonElement:GetDataSource()
|
local dataSource = buttonElement:GetDataSource()
|
||||||
dataSource.buttonOnHoverFunction(unhoveredElement, eventArgs)
|
dataSource.buttonOnHoverFunction(unhoveredElement, eventArgs)
|
||||||
dataSource = buttonElement:GetDataSource()
|
dataSource = buttonElement:GetDataSource()
|
||||||
dataSource = dataSource.levelName
|
dataSource = dataSource.modName
|
||||||
end)
|
end)
|
||||||
|
|
||||||
buttonElement:registerEventHandler("grid_anim", function(element, event)
|
buttonElement:registerEventHandler("grid_anim", function(element, event)
|
||||||
@ -26,7 +26,7 @@ local function PostLoadFunc(buttonElement, controllerIndex, controller)
|
|||||||
|
|
||||||
buttonElement:SubscribeToDataSourceThroughElement(buttonElement, nil, function()
|
buttonElement:SubscribeToDataSourceThroughElement(buttonElement, nil, function()
|
||||||
local dataSource = buttonElement:GetDataSource()
|
local dataSource = buttonElement:GetDataSource()
|
||||||
dataSource = dataSource.levelName
|
dataSource = dataSource.modName
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ local function postLoadFunction(menuElement, controllerIndex, controller)
|
|||||||
local fsGame = Engine.GetDvarString("fs_game")
|
local fsGame = Engine.GetDvarString("fs_game")
|
||||||
if fsGame ~= "" then
|
if fsGame ~= "" then
|
||||||
menuElement.LoadedModName:setText("^3Loaded mod^7: " .. fsGame)
|
menuElement.LoadedModName:setText("^3Loaded mod^7: " .. fsGame)
|
||||||
menuElement.bindButton:addEventHandler("button_alt2", unloadMod)
|
menuElement.bindButton:addEventHandler("button_alt1", unloadMod)
|
||||||
else
|
else
|
||||||
menuElement.LoadedModName:setText("")
|
menuElement.LoadedModName:setText("")
|
||||||
end
|
end
|
||||||
@ -116,7 +116,7 @@ local function postLoadFunction(menuElement, controllerIndex, controller)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ModSelectMenu(menu, controller)
|
function ModSelectMenu(arg0, controller)
|
||||||
local menuElement = LUI.UIElement.new()
|
local menuElement = LUI.UIElement.new()
|
||||||
menuElement.id = "ModSelectMenu"
|
menuElement.id = "ModSelectMenu"
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ function ModSelectMenu(menu, controller)
|
|||||||
if fsGame ~= "" then
|
if fsGame ~= "" then
|
||||||
arg0:AddButtonHelperText({
|
arg0:AddButtonHelperText({
|
||||||
helper_text = Engine.Localize("LUA_MENU_UNLOAD"),
|
helper_text = Engine.Localize("LUA_MENU_UNLOAD"),
|
||||||
button_ref = "button_alt2",
|
button_ref = "button_alt1",
|
||||||
side = "left",
|
side = "left",
|
||||||
clickable = true
|
clickable = true
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user