PGRData/Resources/Scripts/XUi/XUiFubenBabelTower/XUiGridInfoEnvironmentItem.lua
2022-12-26 14:06:01 +05:30

20 lines
No EOL
606 B
Lua

local XUiGridInfoEnvironmentItem = XClass(nil, "XUiGridInfoEnvironmentItem")
function XUiGridInfoEnvironmentItem:Ctor(ui)
self.GameObject = ui.gameObject
self.Transform = ui.transform
XTool.InitUiObject(self)
end
function XUiGridInfoEnvironmentItem:Init(uiRoot)
self.UiRoot = uiRoot
end
function XUiGridInfoEnvironmentItem:SetItemInfo(buffId, index)
local buffConfigs = XFubenBabelTowerConfigs.GetBabelBuffConfigs(buffId)
self.TxtNumber.text = (index > 9) and index or string.format("0%d", index)
self.TxtAmbien.text = buffConfigs.Desc
end
return XUiGridInfoEnvironmentItem