UINotifyTipsSimpleCtr.lua 811 B

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