UIIdolSupportTipsCtr.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. local UIIdolSupportTipsCtr = class("UIIdolSupportTipsCtr", require("UICtrBase"))
  2. function UIIdolSupportTipsCtr:Init(view)
  3. self.view = view
  4. end
  5. function UIIdolSupportTipsCtr:SetData(data)
  6. self.asyncIdx = 0
  7. if data == nil then return end
  8. self.data = data
  9. self.cb = data[3]
  10. self.cbwnd = data[2]
  11. self.cfgId = data[1]
  12. self.logicData = data[4]
  13. self.maxNum = data[5]
  14. self.selectNum = data[5]
  15. end
  16. function UIIdolSupportTipsCtr:GetAsyncIdx()
  17. self.asyncIdx = self.asyncIdx + 1
  18. return self.asyncIdx
  19. end
  20. function UIIdolSupportTipsCtr:GetData()
  21. return self.data
  22. end
  23. function UIIdolSupportTipsCtr:GetCfgId()
  24. return self.cfgId or 0
  25. end
  26. function UIIdolSupportTipsCtr:GetselectNum()
  27. return self.selectNum or 0
  28. end
  29. function UIIdolSupportTipsCtr:GetmaxNum()
  30. return self.maxNum or 0
  31. end
  32. function UIIdolSupportTipsCtr:SetselectNum(num)
  33. self.selectNum = num
  34. end
  35. function UIIdolSupportTipsCtr:GetLogicData()
  36. return self.logicData or nil
  37. end
  38. function UIIdolSupportTipsCtr:CallBack()
  39. if self.cb and self.cbwnd then
  40. self.cb(self.cbwnd,{self.selectNum,self.logicData.uid})
  41. end
  42. end
  43. function UIIdolSupportTipsCtr:OnDispose()
  44. self.data = nil
  45. self.view = nil
  46. end
  47. return UIIdolSupportTipsCtr