123456789101112131415161718192021222324252627282930313233343536373839 |
- ---@class KLOpenServerAthleticsGetItemItem:UIKmlLuaPanelBase
- ---@field view KLOpenServerAthleticsGetItemItemView
- local KLOpenServerAthleticsGetItemItem = class(UIKmlLuaPanelBase)
- local this =KLOpenServerAthleticsGetItemItem
- ---创建时调用一次
- function this:Init()
- self.ItemList=nil
- end
- ---注册UI事件和服务器消息
- function this:RegistEvents()
- end
- ---界面显示时调用一次
- function this:Show()
- end
- ---创建或者刷新界面数据时调用
- function this:Refresh()
- end
- function this:UpDataItem(data)
- if self.ItemList then
- GUI:Item_UpdataData(self.ItemList, data)
- else
- self.ItemList = GUI:Item_Create(self.view.ItemModelPos, data)
- end
- GUI:AddOnClickEvent(self.ItemList, self, function()
- SL:OpenTips(nil, data.itemid)
- end)
- end
- function this:SetGet(value)
- GUI:SetActive(self.view.HaveGet,value)
- end
- function this:Close()
- self.ItemList=nil
- end
- return this
|