FindBagFirstCard.lua 732 B

1234567891011121314151617181920212223242526272829303132
  1. local FindBagFirstCard = class("FindBagFirstCard", require("ForceGuide/ForceGuideBase"))
  2. function FindBagFirstCard:ctor(data)
  3. end
  4. function FindBagFirstCard:Enter(forceView, uiId, param, cb)
  5. self.wnd = forceView
  6. self.cb = cb
  7. local page = ManagerContainer.LuaUIMgr:GetPage(uiId)
  8. if page == nil then
  9. self.cb(self.wnd, true)
  10. return
  11. end
  12. --TODO
  13. local bagView = page.MLuaTable
  14. bagView:FindBagFirstCard(self, self.EnterCallBack)
  15. end
  16. function FindBagFirstCard:EnterCallBack(target)
  17. if self.wnd and self.cb then
  18. if target == nil then
  19. self.cb(self.wnd, true)
  20. else
  21. self.cb(self.wnd, false, target)
  22. end
  23. end
  24. end
  25. return FindBagFirstCard