PGRData/Script/matrix/xui/xuibiancatheatre/XUiComfirmEventNodePanel.lua

25 lines
792 B
Lua
Raw Normal View History

2024-09-01 20:49:41 +00:00
local XUiComfirmEventNodePanel = XClass(nil, "XUiComfirmEventNodePanel")
function XUiComfirmEventNodePanel:Ctor(ui, rootUi)
XUiHelper.InitUiClass(self, ui)
self.RootUi = rootUi
-- XATalkEventNode | XABattleEventNode | XMovieEventNode
self.Node = nil
end
-- node : XATalkEventNode | XABattleEventNode | XMovieEventNode
function XUiComfirmEventNodePanel:SetData(node)
self.Node = node
self.TxtContent.text = node:GetDesc()
self.BtnOK:SetNameByGroup(0, node:GetBtnConfirmText())
XUiHelper.RegisterClickEvent(self, self.BtnOK, self.OnBtnComfirmClicked)
end
function XUiComfirmEventNodePanel:OnBtnComfirmClicked()
self.Node:RequestTriggerNode(function(newEventNode)
self.RootUi:RefreshNode(newEventNode)
end)
end
return XUiComfirmEventNodePanel