This commit is contained in:
quaK 2024-08-06 13:26:49 +03:00
parent 7bc8ae7798
commit 25b070a106
6 changed files with 144 additions and 169 deletions

View File

@ -1,40 +1,40 @@
local f0_local0 = function(f1_arg0, f1_arg1)
local f0_local0 = function(arg0, arg1)
Engine.Exec("xblive_privatematch 0")
utils.cp.AliensUtils.AliensRunConfig(f1_arg1.controller)
LUI.FlowManager.RequestAddMenu("SystemLinkMenu", false, f1_arg1.controller, false, {}, true)
utils.cp.AliensUtils.AliensRunConfig(arg1.controller)
LUI.FlowManager.RequestAddMenu("SystemLinkMenu", false, arg1.controller, false, {}, true)
end
local f0_local1 = function(f2_arg0, f2_arg1)
f0_local0(f2_arg0, f2_arg1)
local f0_local1 = function(arg0, arg1)
f0_local0(arg0, arg1)
end
local f0_local2 = function(f3_arg0, f3_arg1)
Engine.Exec(MPConfig.default_xboxlive, f3_arg1.controller)
local f0_local2 = function(arg0, arg1)
Engine.Exec(MPConfig.default_xboxlive, 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, {
LUI.FlowManager.RequestAddMenu("CPPrivateMatchMenu", false, arg1.controller, false, {
showPlayNowButton = true,
isPublicMatch = false
})
end
local f0_local3 = function(f4_arg0, f4_arg1)
Engine.Exec(MPConfig.default_xboxlive, f4_arg1.controller)
local f0_local3 = function(arg0, arg1)
Engine.Exec(MPConfig.default_xboxlive, arg1.controller)
Engine.SetDvarBool("xblive_privatematch", true)
SetIsAliensSolo(false)
Engine.Exec("xstartprivatematch")
LUI.FlowManager.RequestAddMenu("CPPrivateMatchMenu", false, f4_arg1.controller, false, {
LUI.FlowManager.RequestAddMenu("CPPrivateMatchMenu", false, 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 f0_local4 = function(arg0, arg1, arg2)
assert(arg0.PublicMatch)
assert(arg0.SoloMatch)
assert(arg0.CustomMatch)
local f5_local0 = LUI.DataSourceInGlobalModel.new("frontEnd.lobby.areWeGameHost")
local f5_local1 = DataSources.frontEnd.lobby.memberCount
local f5_local2 = function()
@ -43,37 +43,37 @@ local f0_local4 = function(f5_arg0, f5_arg1, f5_arg2)
local f5_local3 = function()
local f7_local0 = f5_local2()
f5_arg0.PublicMatch:SetButtonDisabled(f7_local0)
f5_arg0.CustomMatch:SetButtonDisabled(f7_local0)
arg0.PublicMatch:SetButtonDisabled(f7_local0)
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)
arg0:SubscribeToModel(f5_local0:GetModel(arg1), f5_local3)
arg0:SubscribeToModel(f5_local1:GetModel(arg1), f5_local3)
arg0:SubscribeToModel(DataSources.frontEnd.lobby.isSolo:GetModel(arg1), function()
local f8_local0 = DataSources.frontEnd.lobby.isSolo:GetValue(arg1)
if f8_local0 ~= nil then
f5_arg0.SoloMatch:SetButtonDisabled(not f8_local0)
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)
arg0.PublicMatch:addEventHandler("button_action", f0_local1)
arg0.SoloMatch:addEventHandler("button_action", f0_local2)
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)
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)
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)
arg0.CustomMatch:addEventHandler("button_action", f0_local3)
arg0.ContractsButton:addEventHandler("button_action", function(f12_arg0, f12_arg1)
ACTIONS.OpenMenu("ContractMenu", true, f12_arg1.controller or arg1)
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)
end)
end
@ -82,16 +82,16 @@ 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()
local controllerIndex = controller and controller.controllerIndex
if not controllerIndex and not Engine.InFrontend() then
controllerIndex = VNavigator:getRootController()
end
assert(f14_local1)
local f14_local2 = VNavigator
assert(controllerIndex)
local ButtonDescription = nil
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
ButtonDescription.id = "ButtonDescription"
ButtonDescription:SetRGBFromTable(SWATCHES.genericButton.textDisabled, 0)
@ -103,7 +103,7 @@ function CPMainMenuButtons(menu, controller)
local PublicMatch = nil
PublicMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
PublicMatch.id = "PublicMatch"
PublicMatch.buttonDescription = "Browse for Custom Servers"
@ -115,7 +115,7 @@ function CPMainMenuButtons(menu, controller)
local SoloMatch = nil
SoloMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
SoloMatch.id = "SoloMatch"
SoloMatch.buttonDescription = Engine.Localize("LUA_MENU_ZM_SOLO_MATCH_DESC")
@ -127,7 +127,7 @@ function CPMainMenuButtons(menu, controller)
local CustomMatch = nil
CustomMatch = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
CustomMatch.id = "CustomMatch"
CustomMatch.buttonDescription = Engine.Localize("LUA_MENU_ZM_CUSTOM_MATCH_DESC")
@ -139,7 +139,7 @@ function CPMainMenuButtons(menu, controller)
local Loadout = nil
Loadout = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
Loadout.id = "Loadout"
Loadout.buttonDescription = Engine.Localize("LUA_MENU_ZM_LOADOUT_DESC")
@ -151,7 +151,7 @@ function CPMainMenuButtons(menu, controller)
local Barracks = nil
Barracks = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
Barracks.id = "Barracks"
Barracks.buttonDescription = Engine.Localize("LUA_MENU_ZM_BARRACKS_DESC")
@ -163,7 +163,7 @@ function CPMainMenuButtons(menu, controller)
local Armory = nil
Armory = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
Armory.id = "Armory"
Armory.buttonDescription = Engine.Localize("LUA_MENU_ZM_SURVIVAL_DEPOT_DESC")
@ -175,7 +175,7 @@ function CPMainMenuButtons(menu, controller)
local ModsButton = nil
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
ModsButton.id = "ModsButton"
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
@ -187,14 +187,14 @@ function CPMainMenuButtons(menu, controller)
local ContractsButton = nil
ContractsButton = MenuBuilder.BuildRegisteredType("ContractsButtonCP", {
controllerIndex = f14_local1
controllerIndex = controllerIndex
})
ContractsButton.id = "ContractsButton"
ContractsButton:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 340, _1080p * 280, _1080p * 340)
VNavigator:addElement(ContractsButton)
VNavigator.ContractsButton = ContractsButton
f0_local4(VNavigator, f14_local1, controller)
f0_local4(VNavigator, controllerIndex, controller)
return VNavigator
end

View File

@ -1,13 +1,13 @@
local f0_local1 = function(f2_arg0)
f2_arg0.ResumeButton:SetButtonDisabled(not Engine.CanResumeGame(f2_arg0._controllerIndex))
if not CONDITIONS.IsTrialLicense(f2_arg0) then
local f2_local0 = f2_arg0.MissionSelectButton
local f0_local1 = function(arg0)
arg0.ResumeButton:SetButtonDisabled(not Engine.CanResumeGame(arg0._controllerIndex))
if not CONDITIONS.IsTrialLicense(arg0) then
local f2_local0 = arg0.MissionSelectButton
local f2_local1 = f2_local0
f2_local0 = f2_local0.SetButtonDisabled
local f2_local2 = Engine.IsTrialLicense()
if not f2_local2 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
f2_local2 = false
end
@ -16,21 +16,7 @@ local f0_local1 = function(f2_arg0)
end
end
local f0_local2 = function(f3_arg0, f3_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)
local f0_local3 = function(arg0, arg1)
LUI.FlowManager.RequestPopupMenu(nil, "FakeLoadingScreenOverlay", true, 0, false, {
onLoadCompleteFunc = function()
Engine.Exec("set ui_play_credits 1; map shipcrib_epilogue")
@ -38,47 +24,41 @@ local f0_local3 = function(f5_arg0, f5_arg1)
})
end
-- MenuBuilder.registerType( "ResumeGamePopup", function ( f7_arg0, f7_arg1 )
-- return MenuBuilder.BuildRegisteredType( "PopupYesNo", {
-- message = Engine.Localize( "@MENU_RESUMEGAME_Q" ),
-- yesAction = f0_local2
-- } )
-- end )
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)
local f0_local4 = function(arg0, arg1, arg2)
assert(arg0.ResumeButton)
assert(arg0.NewButton)
assert(arg0.CreditsButton)
if not CONDITIONS.IsTrialLicense(arg0) then
assert(arg0.MissionSelectButton)
end
f8_arg0._controllerIndex = f8_arg1
f8_arg0.ResumeButton:addEventHandler("button_action", function(f9_arg0, f9_arg1)
arg0._controllerIndex = arg1
arg0.ResumeButton:addEventHandler("button_action", function(f9_arg0, f9_arg1)
Engine.SetDvarString("start", "")
LUI.FlowManager.RequestPopupMenu(f9_arg0, "ResumeGamePopup", false, f9_arg1.controller, false)
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", "")
if Engine.CanResumeGame(f8_arg1) then
LUI.FlowManager.RequestPopupMenu(f8_arg0, "overwrite_warning_menu", true, f10_arg1.controller)
if Engine.CanResumeGame(arg1) then
LUI.FlowManager.RequestPopupMenu(arg0, "overwrite_warning_menu", true, f10_arg1.controller)
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)
if not CONDITIONS.IsTrialLicense(f8_arg0) then
f8_arg0.MissionSelectButton:addEventHandler("button_action", function(f11_arg0, f11_arg1)
if not CONDITIONS.IsTrialLicense(arg0) then
arg0.MissionSelectButton:addEventHandler("button_action", function(f11_arg0, f11_arg1)
Engine.SetDvarString("start", "")
LUI.FlowManager.RequestAddMenu("LevelSelectMenu", true, f11_arg1.controller, false)
end)
end
f8_arg0.CreditsButton:addEventHandler("button_action", f0_local3)
f0_local1(f8_arg0)
f8_arg0:addEventHandler("update_save_game_available_complete", f0_local1)
arg0.CreditsButton:addEventHandler("button_action", f0_local3)
f0_local1(arg0)
arg0:addEventHandler("update_save_game_available_complete", f0_local1)
if Engine.GetDvarFloat("r_filmGrainAtten") == 0.25 then
Engine.SetDvarFloat("r_filmGrainAtten", 1)
Engine.ExecNow("profile_setFilmGrain " .. tostring(1), f8_arg1)
Engine.ExecNow("profile_setFilmGrain " .. tostring(1), arg1)
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)
end)
end
@ -87,17 +67,17 @@ function CampaignMenuButtons(menu, controller)
local self = LUI.UIVerticalList.new()
self:SetAnchorsAndPosition(0, 1, 0, 1, 0, 500 * _1080p, 0, 440 * _1080p)
self.id = "CampaignMenuButtons"
local f12_local1 = controller and controller.controllerIndex
if not f12_local1 and not Engine.InFrontend() then
f12_local1 = self:getRootController()
local controllerIndex = controller and controller.controllerIndex
if not controllerIndex and not Engine.InFrontend() then
controllerIndex = self:getRootController()
end
assert(f12_local1)
local f12_local2 = self
assert(controllerIndex)
self:SetSpacing(10 * _1080p)
local ResumeButton = nil
ResumeButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f12_local1
controllerIndex = controllerIndex
})
ResumeButton.id = "ResumeButton"
ResumeButton.buttonDescription = Engine.Localize("LUA_MENU_RESUME_GAME_DESC")
@ -109,7 +89,7 @@ function CampaignMenuButtons(menu, controller)
local NewButton = nil
NewButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f12_local1
controllerIndex = controllerIndex
})
NewButton.id = "NewButton"
NewButton.buttonDescription = Engine.Localize("LUA_MENU_NEW_GAME_DESC")
@ -118,29 +98,24 @@ function CampaignMenuButtons(menu, controller)
self:addElement(NewButton)
self.NewButton = NewButton
local f12_local5 = nil
local MissionSelectButton = nil
if not CONDITIONS.IsTrialLicense(self) then
f12_local5 = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f12_local1
MissionSelectButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = controllerIndex
})
f12_local5.id = "MissionSelectButton"
MissionSelectButton.id = "MissionSelectButton"
if not CONDITIONS.IsTrialLicense(self) then
else
MissionSelectButton.buttonDescription = Engine.Localize("LUA_MENU_MISSION_SELECT_DESC")
end
if not CONDITIONS.IsTrialLicense(self) then
f12_local5.buttonDescription = Engine.Localize("LUA_MENU_MISSION_SELECT_DESC")
end
f12_local5.Text:setText(Engine.Localize("MENU_MISSION_SELECT_CAPS"), 0)
f12_local5:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 80, _1080p * 110)
self:addElement(f12_local5)
self.MissionSelectButton = f12_local5
MissionSelectButton.Text:setText(Engine.Localize("MENU_MISSION_SELECT_CAPS"), 0)
MissionSelectButton:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 80, _1080p * 110)
self:addElement(MissionSelectButton)
self.MissionSelectButton = MissionSelectButton
end
local CreditsButton = nil
CreditsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f12_local1
controllerIndex = controllerIndex
})
CreditsButton.id = "CreditsButton"
CreditsButton.buttonDescription = Engine.Localize("LUA_MENU_CREDITS_DESC")
@ -152,7 +127,7 @@ function CampaignMenuButtons(menu, controller)
local ModsButton = nil
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f12_local1
controllerIndex = controllerIndex
})
ModsButton.id = "ModsButton"
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
@ -164,14 +139,14 @@ function CampaignMenuButtons(menu, controller)
local ButtonDescription = nil
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
controllerIndex = f12_local1
controllerIndex = controllerIndex
})
ButtonDescription.id = "ButtonDescription"
ButtonDescription:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 504, _1080p * 200, _1080p * 300)
self:addElement(ButtonDescription)
self.ButtonDescription = ButtonDescription
f0_local4(self, f12_local1, controller)
f0_local4(self, controllerIndex, controller)
return self
end

View File

@ -127,15 +127,15 @@ 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()
local controllerIndex = controller and controller.controllerIndex
if not controllerIndex and not Engine.InFrontend() then
controllerIndex = self:getRootController()
end
assert(f11_local1)
assert(controllerIndex)
local ConquestButton = nil
ConquestButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f11_local1
controllerIndex = controllerIndex
})
ConquestButton.id = "ConquestButton"
ConquestButton.buttonDescription = Engine.Localize("LUA_MENU_PUBLIC_MATCH_DESC")
@ -147,7 +147,7 @@ function MPMainMenuButtons(menu, controller)
local MLGGameBattlesButton = nil
if CONDITIONS.IsGameBattlesAllowed(self) then
MLGGameBattlesButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f11_local1
controllerIndex = controllerIndex
})
MLGGameBattlesButton.id = "MLGGameBattlesButton"
if CONDITIONS.IsGameBattlesAllowed(self) then
@ -167,7 +167,7 @@ function MPMainMenuButtons(menu, controller)
local CustomGameButton = nil
CustomGameButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f11_local1
controllerIndex = controllerIndex
})
CustomGameButton.id = "CustomGameButton"
CustomGameButton.buttonDescription = Engine.Localize("LUA_MENU_CUSTOM_GAME_DESC")
@ -179,7 +179,7 @@ function MPMainMenuButtons(menu, controller)
local ModsButton = nil
ModsButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f11_local1
controllerIndex = controllerIndex
})
ModsButton.id = "ModsButton"
ModsButton.buttonDescription = Engine.Localize("LUA_MENU_MODS_DESC")
@ -188,20 +188,20 @@ function MPMainMenuButtons(menu, controller)
self:addElement(ModsButton)
self.ModsButton = ModsButton
local f11_local6 = nil
local StoreButton = nil
if CONDITIONS.IsStoreAllowed(self) then
f11_local6 = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = f11_local1
StoreButton = MenuBuilder.BuildRegisteredType("MenuButton", {
controllerIndex = controllerIndex
})
f11_local6.id = "StoreButton"
f11_local6.buttonDescription = Engine.Localize("LUA_MENU_STORE_DESC")
f11_local6.Text:setText(Engine.Localize("LUA_MENU_STORE_CAPS"), 0)
f11_local6:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 160, _1080p * 190)
self:addElement(f11_local6)
self.StoreButton = f11_local6
StoreButton.id = "StoreButton"
StoreButton.buttonDescription = Engine.Localize("LUA_MENU_STORE_DESC")
StoreButton.Text:setText(Engine.Localize("LUA_MENU_STORE_CAPS"), 0)
StoreButton:SetAnchorsAndPosition(0, 1, 0, 1, 0, _1080p * 500, _1080p * 160, _1080p * 190)
self:addElement(StoreButton)
self.StoreButton = StoreButton
end
f0_local3(self, f11_local1, controller)
f0_local3(self, controllerIndex, controller)
return self
end

View File

@ -1,28 +1,28 @@
local f0_local0 = function(f1_arg0, f1_arg1, f1_arg2)
assert(f1_arg0.CreateAClassButton)
assert(f1_arg0.MissionSelect)
local f0_local0 = function(arg0, arg1, arg2)
assert(arg0.CreateAClassButton)
assert(arg0.MissionSelect)
local f1_local0 = LUI.DataSourceInGlobalModel.new("frontEnd.lobby.findMatchButtonWaitStatus")
f1_arg0:SubscribeToModel(f1_local0:GetModel(f1_arg1), function()
local f2_local0 = f1_local0:GetValue(f1_arg1)
arg0:SubscribeToModel(f1_local0:GetModel(arg1), function()
local f2_local0 = f1_local0:GetValue(arg1)
local f2_local1 = "Browse for Custom Servers"
if f2_local0 == "" then
f1_arg0.MissionSelect:SetButtonDisabled(false)
arg0.MissionSelect:SetButtonDisabled(false)
else
f1_arg0.MissionSelect:SetButtonDisabled(true)
arg0.MissionSelect:SetButtonDisabled(true)
f2_local1 = f2_local0
end
f1_arg0.MissionSelect.buttonDescription = f2_local1
f1_arg0.ButtonDescription:processEvent({
arg0.MissionSelect.buttonDescription = f2_local1
arg0.ButtonDescription:processEvent({
name = "update_button_description",
text = f2_local1
})
end)
if not Onboarding.RigTutorial:WasCompleted(f1_arg1) then
f1_arg0.CreateAClassButton.listDefaultFocus = 0
if not Onboarding.RigTutorial:WasCompleted(arg1) then
arg0.CreateAClassButton.listDefaultFocus = 0
end
if not CONDITIONS.IsQuarterMasterAllowed(f1_arg0) then
f1_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)
if not CONDITIONS.IsQuarterMasterAllowed(arg0) then
arg0.Barracks:SetAnchorsAndPosition(0, 0, 0, 1, 0, 0, _1080p * 120, _1080p * 150)
arg0.ButtonDescription:SetAnchorsAndPosition(0, 0, 0, 1, 0, 0, _1080p * 160, _1080p * 190)
end
end
@ -32,17 +32,17 @@ function MissionsVerticalLayout(menu, controller)
self.id = "MissionsVerticalLayout"
self._animationSets = {}
self._sequences = {}
local f3_local1 = controller and controller.controllerIndex
if not f3_local1 and not Engine.InFrontend() then
f3_local1 = self:getRootController()
local controllerIndex = controller and controller.controllerIndex
if not controllerIndex and not Engine.InFrontend() then
controllerIndex = self:getRootController()
end
assert(f3_local1)
local f3_local2 = self
assert(controllerIndex)
self:SetSpacing(10 * _1080p)
local MissionSelect = nil
MissionSelect = MenuBuilder.BuildRegisteredType("GenericButton", {
controllerIndex = f3_local1
controllerIndex = controllerIndex
})
MissionSelect.id = "MissionSelect"
MissionSelect.buttonDescription = "Browse for Custom Servers"
@ -54,7 +54,7 @@ function MissionsVerticalLayout(menu, controller)
local MissionTeams = nil
MissionTeams = MenuBuilder.BuildRegisteredType("GenericButton", {
controllerIndex = f3_local1
controllerIndex = controllerIndex
})
MissionTeams.id = "MissionTeams"
MissionTeams.buttonDescription = Engine.Localize("LUA_MENU_DESC_MISSION_TEAMS")
@ -66,7 +66,7 @@ function MissionsVerticalLayout(menu, controller)
local CreateAClassButton = nil
CreateAClassButton = MenuBuilder.BuildRegisteredType("CreateAClassButton", {
controllerIndex = f3_local1
controllerIndex = controllerIndex
})
CreateAClassButton.id = "CreateAClassButton"
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
if CONDITIONS.IsQuarterMasterAllowed(self) then
f3_local6 = MenuBuilder.BuildRegisteredType("QuartermasterButton", {
controllerIndex = f3_local1
controllerIndex = controllerIndex
})
f3_local6.id = "Armory"
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
Barracks = MenuBuilder.BuildRegisteredType("BarracksButton", {
controllerIndex = f3_local1
controllerIndex = controllerIndex
})
Barracks.id = "Barracks"
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
if CONDITIONS.AreContractsEnabled(self) then
f3_local8 = MenuBuilder.BuildRegisteredType("ContractsButton", {
controllerIndex = f3_local1
controllerIndex = controllerIndex
})
f3_local8.id = "Contracts"
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
ButtonDescription = MenuBuilder.BuildRegisteredType("ButtonDescriptionText", {
controllerIndex = f3_local1
controllerIndex = controllerIndex
})
ButtonDescription.id = "ButtonDescription"
ButtonDescription.Description:SetRight(_1080p * 415, 0)
@ -147,13 +147,13 @@ function MissionsVerticalLayout(menu, controller)
self._animationSets.DefaultAnimationSet()
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)
end)
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)
f0_local0(self, f3_local1, controller)
f0_local0(self, controllerIndex, controller)
return self
end

View File

@ -10,14 +10,14 @@ local function PostLoadFunc(buttonElement, controllerIndex, controller)
local dataSource = buttonElement:GetDataSource()
dataSource.buttonOnHoverFunction(hoveredElement, eventArgs)
dataSource = buttonElement:GetDataSource()
dataSource = dataSource.levelName
dataSource = dataSource.modName
end)
buttonElement.GenericButton:addEventHandler("button_up", function(unhoveredElement, eventArgs)
local dataSource = buttonElement:GetDataSource()
dataSource.buttonOnHoverFunction(unhoveredElement, eventArgs)
dataSource = buttonElement:GetDataSource()
dataSource = dataSource.levelName
dataSource = dataSource.modName
end)
buttonElement:registerEventHandler("grid_anim", function(element, event)
@ -26,7 +26,7 @@ local function PostLoadFunc(buttonElement, controllerIndex, controller)
buttonElement:SubscribeToDataSourceThroughElement(buttonElement, nil, function()
local dataSource = buttonElement:GetDataSource()
dataSource = dataSource.levelName
dataSource = dataSource.modName
end)
end

View File

@ -92,7 +92,7 @@ local function postLoadFunction(menuElement, controllerIndex, controller)
local fsGame = Engine.GetDvarString("fs_game")
if fsGame ~= "" then
menuElement.LoadedModName:setText("^3Loaded mod^7: " .. fsGame)
menuElement.bindButton:addEventHandler("button_alt2", unloadMod)
menuElement.bindButton:addEventHandler("button_alt1", unloadMod)
else
menuElement.LoadedModName:setText("")
end
@ -116,7 +116,7 @@ local function postLoadFunction(menuElement, controllerIndex, controller)
end)
end
function ModSelectMenu(menu, controller)
function ModSelectMenu(arg0, controller)
local menuElement = LUI.UIElement.new()
menuElement.id = "ModSelectMenu"
@ -292,7 +292,7 @@ function ModSelectMenu(menu, controller)
if fsGame ~= "" then
arg0:AddButtonHelperText({
helper_text = Engine.Localize("LUA_MENU_UNLOAD"),
button_ref = "button_alt2",
button_ref = "button_alt1",
side = "left",
clickable = true
})