删掉子类的代码
parent
2c3ff04b1a
commit
d990d86d56
|
|
@ -88,42 +88,6 @@ function M:InitView(url)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local btn_closeRoom = self._view:GetChild("btn_setting")
|
local btn_closeRoom = self._view:GetChild("btn_setting")
|
||||||
|
|
||||||
self._view:GetChild('btn_closeRoom').onClick:Set(function()
|
|
||||||
---[[
|
|
||||||
--旧
|
|
||||||
local tip_owner = '您是否退出房间?\n(退出房间后房间将解散)'
|
|
||||||
local tip = '您是否退出房间?' -- \n (请注意,申请洗牌后退出,不会返还洗牌分)
|
|
||||||
local tipStr = ''
|
|
||||||
if self._room.agent then
|
|
||||||
tipStr = '您是否退出房间?'
|
|
||||||
else
|
|
||||||
tipStr = self._room.owner_id == self._room.self_player.self_user.account_id and tip_owner or tip
|
|
||||||
end
|
|
||||||
local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel)
|
|
||||||
_curren_msg.onOk:Add(
|
|
||||||
function()
|
|
||||||
if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then
|
|
||||||
ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。')
|
|
||||||
else
|
|
||||||
ViewUtil.ShowModalWait(self._root_view)
|
|
||||||
self._gamectr:LevelRoom(
|
|
||||||
function(res)
|
|
||||||
ViewUtil.CloseModalWait()
|
|
||||||
if res.ReturnCode == 0 then
|
|
||||||
ViewManager.ChangeView(ViewManager.View_Family)
|
|
||||||
else
|
|
||||||
ViewUtil.ErrorTip(res.ReturnCode)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
_curren_msg:Show()
|
|
||||||
--]]
|
|
||||||
end)
|
|
||||||
|
|
||||||
btn_closeRoom.onClick:Add(handler(self, function()
|
btn_closeRoom.onClick:Add(handler(self, function()
|
||||||
local settingView = SettingView.new(self)
|
local settingView = SettingView.new(self)
|
||||||
settingView:Show(self._room)
|
settingView:Show(self._room)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue