Files
StellaSora_DataLua/lua/game/ui/jointdrill/battle/jointdrillmenuctrl.lua
T
SL1900 46f967a584 Update - 1.6.0.84
EN: 1.6.0.84
CN: 1.6.0.87
JP: 1.6.0.88
KR: 1.6.0.91
2026-02-04 13:00:00 +09:00

46 lines
1.7 KiB
Lua

local JointDrillBattleMenuCtrl = class("JointDrillBattleMenuCtrl", BaseCtrl)
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
JointDrillBattleMenuCtrl._mapNodeConfig = {
canvas_group = {
sComponentName = "CanvasGroup",
sNodeName = "----SafeAreaRoot----"
},
btnPause = {
sComponentName = "NaviButton",
callback = "OnBtn_Pause"
},
BtnBg = {}
}
JointDrillBattleMenuCtrl._mapEventConfig = {
InputEnable = "OnEvent_InputEnable",
LoadLevelRefresh = "OnEvent_LoadLevelRefresh",
JointDrill_StopTime = "OnEvent_JointDrill_StopTime",
JointDrill_ShowPauseBnt_Editor = "OnEvent_ShowPauseBntEditor"
}
function JointDrillBattleMenuCtrl:OnEnable()
self._mapNode.BtnBg.gameObject:SetActive(false)
GamepadUIManager.AddGamepadUINode("BattleMenu", self:GetGamepadUINode())
end
function JointDrillBattleMenuCtrl:OnDisable()
end
function JointDrillBattleMenuCtrl:OnBtn_Pause()
EventManager.Hit("BattlePause")
end
function JointDrillBattleMenuCtrl:OnEvent_InputEnable(bEnable)
NovaAPI.SetCanvasGroupAlpha(self._mapNode.canvas_group, bEnable == true and 1 or 0)
NovaAPI.SetCanvasGroupInteractable(self._mapNode.canvas_group, bEnable == true)
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.canvas_group, bEnable == true)
self._mapNode.btnPause.interactable = bEnable == true
end
function JointDrillBattleMenuCtrl:OnEvent_LoadLevelRefresh()
self._mapNode.BtnBg.gameObject:SetActive(true)
end
function JointDrillBattleMenuCtrl:OnEvent_JointDrill_StopTime()
self._mapNode.BtnBg.gameObject:SetActive(false)
end
function JointDrillBattleMenuCtrl:OnEvent_ShowPauseBntEditor()
self._mapNode.BtnBg.gameObject:SetActive(true)
self._mapNode.btnPause.gameObject:GetComponent("NaviButton").enabled = true
end
return JointDrillBattleMenuCtrl