Files
StellaSora_DataLua/lua/game/ui/activity/throwgifts/throwgiftitemdicgridctrl.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

38 lines
1.2 KiB
Lua

local ThrowGiftItemDicGridCtrl = class("ThrowGiftItemDicGridCtrl", BaseCtrl)
ThrowGiftItemDicGridCtrl._mapNodeConfig = {
imgBgItemNormal = {sComponentName = "Image"},
imgItemIcon = {sComponentName = "Image"},
TMPItemName = {sComponentName = "TMP_Text"},
rtUnlock = {},
rtLock = {}
}
ThrowGiftItemDicGridCtrl._mapEventConfig = {}
ThrowGiftItemDicGridCtrl._mapRedDotConfig = {}
function ThrowGiftItemDicGridCtrl:Awake()
end
function ThrowGiftItemDicGridCtrl:FadeIn()
end
function ThrowGiftItemDicGridCtrl:FadeOut()
end
function ThrowGiftItemDicGridCtrl:OnEnable()
end
function ThrowGiftItemDicGridCtrl:OnDisable()
end
function ThrowGiftItemDicGridCtrl:OnDestroy()
end
function ThrowGiftItemDicGridCtrl:OnRelease()
end
function ThrowGiftItemDicGridCtrl:SetItem(nItemId, bUnlock)
local mapItemCfgData = ConfigTable.GetData("ThrowGiftItem", nItemId)
if mapItemCfgData == nil then
self.gameObject:SetActive(false)
return
end
self.gameObject:SetActive(true)
NovaAPI.SetTMPText(self._mapNode.TMPItemName, mapItemCfgData.Name)
self:SetPngSprite(self._mapNode.imgItemIcon, mapItemCfgData.Icon)
self._mapNode.rtUnlock:SetActive(bUnlock)
self._mapNode.rtLock:SetActive(not bUnlock)
end
return ThrowGiftItemDicGridCtrl