BagCardInsert.lua 731 B

1234567891011121314151617181920212223242526272829303132
  1. local BagCardInsert = class("BagCardInsert", require("ForceGuide/ForceGuideBase"))
  2. function BagCardInsert:ctor(data)
  3. end
  4. function BagCardInsert: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 cardEquipListView = page.MLuaTable
  14. cardEquipListView:BagCardInsert(self, self.EnterCallBack)
  15. end
  16. function BagCardInsert: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 BagCardInsert