|
|
- CSMainAppointOtherRecordView = CSMainAppointOtherRecordView or BaseClass(BaseView)
- local CSMainAppointOtherRecordView = CSMainAppointOtherRecordView
-
- function CSMainAppointOtherRecordView:__init()
- self.base_file = "csMain"
- self.layout_file = "CSMainAppointOtherRecordView"
- self.layer_name = "Activity"
- self.destroy_imm = true
- self.use_background = true
- self.change_scene_close = true
- self.hide_maincancas = true --是否隐藏主界面
- self.append_to_ctl_queue = false --是否要添加进界面堆栈
- self.need_show_money = false --是否要显示顶部的金钱栏
-
- self.click_bg_toClose = true
-
- self.model = CSMainModel:getInstance()
-
- self.role_item_list = {}
-
-
- self.load_callback = function ()
- self:LoadSuccess()
- self:AddEvent()
- end
- self.open_callback = function ( )
- self:OpenSuccess()
- end
- self.destroy_callback = function ( )
- self:DestroySuccess()
- end
- end
-
- function CSMainAppointOtherRecordView:Open(vo)
- self.data = vo
- BaseView.Open(self)
- end
-
- function CSMainAppointOtherRecordView:LoadSuccess()
- local nodes = {
- "bg:raw", "roleCon",
- "des:tmp",
- }
- self:GetChildren(nodes)
-
- lua_resM:setOutsideRawImage(self,self.bg_raw,GameResPath.GetViewBigBg("cs_main_other_record_bg"))
- self.des_tmp.text = "该界面展示玩家为<#ffffff>本期合服对象服务器官员</color>"
- end
-
- function CSMainAppointOtherRecordView:AddEvent()
-
- end
-
- function CSMainAppointOtherRecordView:OpenSuccess()
- self:UpdateView()
- end
-
- function CSMainAppointOtherRecordView:UpdateView( )
- for k,v in pairs(self.role_item_list) do
- v:SetVisible(false)
- end
- for i,v in ipairs(self.data) do
- local item = self.role_item_list[i]
- if not item then
- item = CSMainAppointRoleItem.New(self.roleCon)
- self.role_item_list[i] = item
- end
- item:SetVisible(true)
- item:SetData(v)
- end
- end
-
-
- function CSMainAppointOtherRecordView:DestroySuccess( )
- for i, v in ipairs(self.role_item_list) do
- v:DeleteMe()
- end
- self.role_item_list = {}
- end
|