KLOpenServerAthleticsGetItemItem.lua 931 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. ---@class KLOpenServerAthleticsGetItemItem:UIKmlLuaPanelBase
  2. ---@field view KLOpenServerAthleticsGetItemItemView
  3. local KLOpenServerAthleticsGetItemItem = class(UIKmlLuaPanelBase)
  4. local this =KLOpenServerAthleticsGetItemItem
  5. ---创建时调用一次
  6. function this:Init()
  7. self.ItemList=nil
  8. end
  9. ---注册UI事件和服务器消息
  10. function this:RegistEvents()
  11. end
  12. ---界面显示时调用一次
  13. function this:Show()
  14. end
  15. ---创建或者刷新界面数据时调用
  16. function this:Refresh()
  17. end
  18. function this:UpDataItem(data)
  19. if self.ItemList then
  20. GUI:Item_UpdataData(self.ItemList, data)
  21. else
  22. self.ItemList = GUI:Item_Create(self.view.ItemModelPos, data)
  23. end
  24. GUI:AddOnClickEvent(self.ItemList, self, function()
  25. SL:OpenTips(nil, data.itemid)
  26. end)
  27. end
  28. function this:SetGet(value)
  29. GUI:SetActive(self.view.HaveGet,value)
  30. end
  31. function this:Close()
  32. self.ItemList=nil
  33. end
  34. return this