UIWaitingCtr.lua 813 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. local UIWaitingCtr = class("UIWaitingCtr", require("UICtrBase"))
  2. function UIWaitingCtr:Init(view)
  3. self.view = view
  4. self.NoticeType = -1
  5. self.NoticeText = ""
  6. self.TimeData = nil
  7. end
  8. function UIWaitingCtr:SetData(data)
  9. self.asyncIdx = 0
  10. if data == nil then return end
  11. self.data = data
  12. self.NoticeType = -1
  13. self.NoticeText = ""
  14. self.TimeData = nil
  15. if self.data then
  16. self.NoticeType = self.data[1] or -1
  17. self.NoticeText = self.data[2] or ""
  18. self.TimeData = self.data[3]
  19. end
  20. end
  21. function UIWaitingCtr:GetAsyncIdx()
  22. self.asyncIdx = self.asyncIdx + 1
  23. return self.asyncIdx
  24. end
  25. function UIWaitingCtr:GetData()
  26. return self.data
  27. end
  28. function UIWaitingCtr:OnDispose()
  29. self.data = nil
  30. self.view = nil
  31. end
  32. function UIWaitingCtr:GetNoticeType()
  33. return self.NoticeType
  34. end
  35. return UIWaitingCtr