PGRData/Script/matrix/xui/xuiescape/layer/XUiGridFightEventBuff.lua

23 lines
906 B
Lua
Raw Normal View History

2024-09-01 22:49:41 +02:00
---@class XUiGridFightEventBuff
local XUiGridFightEventBuff = XClass(nil, "XUiGridFightEventBuff")
function XUiGridFightEventBuff:Ctor(ui)
self.GameObject = ui.gameObject
self.Transform = ui.transform
XTool.InitUiObject(self)
XUiHelper.RegisterClickEvent(self, self.RImgIcon:GetComponent("RawImage"), self.ShowInfo)
end
function XUiGridFightEventBuff:Refresh(showFightEventId)
self.ShowFightEventId = showFightEventId
local fightEventDetailConfig = XFubenConfigs.GetStageFightEventDetailsByStageFightEventId(showFightEventId)
self.RImgIcon:SetRawImage(fightEventDetailConfig.Icon)
end
function XUiGridFightEventBuff:ShowInfo()
local fightEventDetailConfig = XFubenConfigs.GetStageFightEventDetailsByStageFightEventId(self.ShowFightEventId)
XUiManager.UiFubenDialogTip(fightEventDetailConfig.Name, fightEventDetailConfig.Description)
end
return XUiGridFightEventBuff