Files
StellaSora_DataLua/lua/game/ui/activity/throwgifts/throwgiftpausectrl.lua
T
SL1900 86d82306fe Update - 1.7.0.88
EN: 1.7.0.88
CN: 1.7.0.90
JP: 1.7.0.91
KR: 1.7.0.94
2026-02-24 22:00:00 +09:00

80 lines
2.1 KiB
Lua

local ThrowGiftPauseCtrl = class("ThrowGiftPauseCtrl", BaseCtrl)
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
ThrowGiftPauseCtrl._mapNodeConfig = {
blur = {},
txt_title = {
sComponentName = "TMP_Text",
sLanguageId = "Activity_ThrowGifts_Text_Pause"
},
txt_exit = {
nCount = 2,
sComponentName = "TMP_Text",
sLanguageId = "TowerDef_Button_Leave"
},
txt_restart = {
nCount = 2,
sComponentName = "TMP_Text",
sLanguageId = "TowerDef_Button_Re"
},
txt_continue = {
nCount = 2,
sComponentName = "TMP_Text",
sLanguageId = "TowerDef_Button_Back"
},
btn_exit = {
sComponentName = "NaviButton",
callback = "OnBtnClick_Exit",
sAction = "Giveup"
},
btn_restart = {
sComponentName = "NaviButton",
callback = "OnBtnClick_Restart",
sAction = "Retry"
},
btn_continue = {
sComponentName = "NaviButton",
callback = "OnBtnClick_Continue",
sAction = "Back"
},
txt_dic = {
nCount = 2,
sComponentName = "TMP_Text",
sLanguageId = "Tutorial_DicTitle"
},
btn_dic = {
sComponentName = "NaviButton",
callback = "OnBtnClick_Dic",
sAction = "Depot"
}
}
ThrowGiftPauseCtrl._mapEventConfig = {}
ThrowGiftPauseCtrl._mapRedDotConfig = {}
function ThrowGiftPauseCtrl:Awake()
self.tbGamepadUINode = self:GetGamepadUINode()
end
function ThrowGiftPauseCtrl:Open(DictionaryID)
self.gameObject:SetActive(true)
self.DictionaryID = DictionaryID
self._mapNode.btn_dic.gameObject:SetActive(self.DictionaryID > 0)
GamepadUIManager.EnableGamepadUI("ThrowGiftPauseCtrl", self.tbGamepadUINode)
end
function ThrowGiftPauseCtrl:Close()
GamepadUIManager.DisableGamepadUI("ThrowGiftPauseCtrl")
self.gameObject:SetActive(false)
end
function ThrowGiftPauseCtrl:OnBtnClick_Exit()
EventManager.Hit("ThrowGift_Exit_OnClick")
end
function ThrowGiftPauseCtrl:OnBtnClick_Restart()
EventManager.Hit("ThrowGift_Restart_OnClick")
end
function ThrowGiftPauseCtrl:OnBtnClick_Continue()
EventManager.Hit("ThrowGift_Continue_OnClick")
end
function ThrowGiftPauseCtrl:OnBtnClick_Dic()
if self.DictionaryID > 0 then
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, self.DictionaryID, true)
end
end
return ThrowGiftPauseCtrl