local MJRoomToolView = require("mj.luaScript.Views.Room.MJRoomToolView"); local luzhouguiRoomToolView = class("luzhouguiRoomToolView", MJRoomToolView); function luzhouguiRoomToolView:ctor () luzhouguiRoomToolView.super.ctor(self); end function luzhouguiRoomToolView:onEnter( ) luzhouguiRoomToolView.super.onEnter(self); if self.ui.Items.Layout_Rule then self.ui.Items.Layout_Rule:setVisible(false); end if self.ui.Items.Button_Rule then self.ui.Items.Button_Rule:setVisible(false); end if app.room.roomInfo.isEapCreate == 1 then self.ui.Items.Button_Voice:setVisible(false) self.ui.Items.Button_Face:setVisible(false) --隐藏解散和退出按钮 self.ui.Items.Button_Dismiss:setVisible(false) self.ui.Items.Button_Leave:setVisible(false) self.ui.Items.ImageView_cdfgx_2:setVisible(false) end end function luzhouguiRoomToolView:onClickRule () -- 重写,不使用MJRoomToolView里面的规则弹框 end function luzhouguiRoomToolView:hideRule () -- 重写,不使用MJRoomToolView里面的规则弹框 end function luzhouguiRoomToolView:updateButton() luzhouguiRoomToolView.super.updateButton(self) if app.room.roomInfo.isEapCreate == 1 then if self.ui.Items.Button_Leave then self.ui.Items.Button_Leave:setEnabled(false) end end end function luzhouguiRoomToolView:checkCanDismiss( ) local onCanDismissCallback = function (info) local nUserId = app.room:getMyUserId() local roomInfo = app.room.roomInfo or {} local canDismiss = (tonumber(info.canDismiss or 1) == 1) or roomInfo.nRoomOwnedUid == nUserId or dd.IClub.isAdmin() if roomInfo.nGameStartCount == 0 and roomInfo.nRoomOwnedUid ~= nUserId then canDismiss = false end if roomInfo.isEapCreate == 1 then canDismiss = false end self:onCanDismissCallback(canDismiss) end if dd.IClub.getCanDismiss then local canDismiss = dd.IClub.getCanDismiss(onCanDismissCallback) if canDismiss then onCanDismissCallback({canDismiss = canDismiss}) end end end function luzhouguiRoomToolView:setWetChatVisible(bVisible) luzhouguiRoomToolView.super.setWetChatVisible(self, bVisible) if app.room.roomInfo.isEapCreate == 1 then self.ui.Items.Button_Invite:getParent():setVisible(false) end end return luzhouguiRoomToolView;