Files
StellaSora_DataLua/lua/game/ui/jointdrill/jointdrillmenuctrl.lua
T
SL1900 5e0d58cfad Initial version - 1.2.0.60
EN: 1.2.0.60
CN: 1.2.0.61
JP: 1.2.0.63
KR: 1.2.0.67
2025-12-03 01:00:00 +09:00

41 lines
1.5 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"
}
function JointDrillBattleMenuCtrl:OnEnable()
self._mapNode.btnPause.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.btnPause.gameObject:SetActive(true)
end
function JointDrillBattleMenuCtrl:OnEvent_JointDrill_StopTime()
self._mapNode.BtnBg.gameObject:SetActive(false)
end
return JointDrillBattleMenuCtrl