源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.9 KiB

  1. CSMainAppointOtherRecordView = CSMainAppointOtherRecordView or BaseClass(BaseView)
  2. local CSMainAppointOtherRecordView = CSMainAppointOtherRecordView
  3. function CSMainAppointOtherRecordView:__init()
  4. self.base_file = "csMain"
  5. self.layout_file = "CSMainAppointOtherRecordView"
  6. self.layer_name = "Activity"
  7. self.destroy_imm = true
  8. self.use_background = true
  9. self.change_scene_close = true
  10. self.hide_maincancas = true --是否隐藏主界面
  11. self.append_to_ctl_queue = false --是否要添加进界面堆栈
  12. self.need_show_money = false --是否要显示顶部的金钱栏
  13. self.click_bg_toClose = true
  14. self.model = CSMainModel:getInstance()
  15. self.role_item_list = {}
  16. self.load_callback = function ()
  17. self:LoadSuccess()
  18. self:AddEvent()
  19. end
  20. self.open_callback = function ( )
  21. self:OpenSuccess()
  22. end
  23. self.destroy_callback = function ( )
  24. self:DestroySuccess()
  25. end
  26. end
  27. function CSMainAppointOtherRecordView:Open(vo)
  28. self.data = vo
  29. BaseView.Open(self)
  30. end
  31. function CSMainAppointOtherRecordView:LoadSuccess()
  32. local nodes = {
  33. "bg:raw", "roleCon",
  34. "des:tmp",
  35. }
  36. self:GetChildren(nodes)
  37. lua_resM:setOutsideRawImage(self,self.bg_raw,GameResPath.GetViewBigBg("cs_main_other_record_bg"))
  38. self.des_tmp.text = "该界面展示玩家为<#ffffff>本期合服对象服务器官员</color>"
  39. end
  40. function CSMainAppointOtherRecordView:AddEvent()
  41. end
  42. function CSMainAppointOtherRecordView:OpenSuccess()
  43. self:UpdateView()
  44. end
  45. function CSMainAppointOtherRecordView:UpdateView( )
  46. for k,v in pairs(self.role_item_list) do
  47. v:SetVisible(false)
  48. end
  49. for i,v in ipairs(self.data) do
  50. local item = self.role_item_list[i]
  51. if not item then
  52. item = CSMainAppointRoleItem.New(self.roleCon)
  53. self.role_item_list[i] = item
  54. end
  55. item:SetVisible(true)
  56. item:SetData(v)
  57. end
  58. end
  59. function CSMainAppointOtherRecordView:DestroySuccess( )
  60. for i, v in ipairs(self.role_item_list) do
  61. v:DeleteMe()
  62. end
  63. self.role_item_list = {}
  64. end