exmainview取消最桌面兼容判断
parent
288a46eca3
commit
b59bc30c50
|
|
@ -90,49 +90,47 @@ function M:InitView(url)
|
||||||
showNextList.selectedIndex = -1
|
showNextList.selectedIndex = -1
|
||||||
self._showNextName = nil
|
self._showNextName = nil
|
||||||
end)
|
end)
|
||||||
if self._room.room_config.people_num == 2 then
|
local btn_closeRoom = self._view:GetChild("btn_setting")
|
||||||
local btn_closeRoom = self._view:GetChild("btn_setting")
|
|
||||||
|
|
||||||
self._view:GetChild('btn_closeRoom').onClick:Set(function()
|
self._view:GetChild('btn_closeRoom').onClick:Set(function()
|
||||||
---[[
|
---[[
|
||||||
--旧
|
--旧
|
||||||
local tip_owner = '您是否退出房间?\n(退出房间后房间将解散)'
|
local tip_owner = '您是否退出房间?\n(退出房间后房间将解散)'
|
||||||
local tip = '您是否退出房间?' -- \n (请注意,申请洗牌后退出,不会返还洗牌分)
|
local tip = '您是否退出房间?' -- \n (请注意,申请洗牌后退出,不会返还洗牌分)
|
||||||
local tipStr = ''
|
local tipStr = ''
|
||||||
if self._room.agent then
|
if self._room.agent then
|
||||||
tipStr = '您是否退出房间?'
|
tipStr = '您是否退出房间?'
|
||||||
else
|
else
|
||||||
tipStr = self._room.owner_id == self._room.self_player.self_user.account_id and tip_owner or tip
|
tipStr = self._room.owner_id == self._room.self_player.self_user.account_id and tip_owner or tip
|
||||||
end
|
end
|
||||||
local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel)
|
local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel)
|
||||||
_curren_msg.onOk:Add(
|
_curren_msg.onOk:Add(
|
||||||
function()
|
function()
|
||||||
if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then
|
if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then
|
||||||
ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。')
|
ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。')
|
||||||
else
|
else
|
||||||
ViewUtil.ShowModalWait(self._root_view)
|
ViewUtil.ShowModalWait(self._root_view)
|
||||||
self._gamectr:LevelRoom(
|
self._gamectr:LevelRoom(
|
||||||
function(res)
|
function(res)
|
||||||
ViewUtil.CloseModalWait()
|
ViewUtil.CloseModalWait()
|
||||||
if res.ReturnCode == 0 then
|
if res.ReturnCode == 0 then
|
||||||
ViewManager.ChangeView(ViewManager.View_Family)
|
ViewManager.ChangeView(ViewManager.View_Family)
|
||||||
else
|
else
|
||||||
ViewUtil.ErrorTip(res.ReturnCode)
|
ViewUtil.ErrorTip(res.ReturnCode)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
)
|
end
|
||||||
end
|
)
|
||||||
end
|
end
|
||||||
)
|
end
|
||||||
_curren_msg:Show()
|
)
|
||||||
--]]
|
_curren_msg:Show()
|
||||||
end)
|
--]]
|
||||||
|
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()
|
settingView:Show()
|
||||||
end))
|
end))
|
||||||
end
|
|
||||||
|
|
||||||
--------
|
--------
|
||||||
self:PlayerChangeLineState()
|
self:PlayerChangeLineState()
|
||||||
|
|
@ -192,13 +190,8 @@ function M:IsShowGangZi(btn, isShow)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:UpdateRound()
|
function M:UpdateRound()
|
||||||
if self._room.room_config.people_num == 2 then
|
self._view:GetChild("text_round").text = string.format("当前局数:%d/%d", self._room.curren_round,
|
||||||
self._view:GetChild("text_round").text = string.format("当前局数:%d/%d", self._room.curren_round,
|
self._room.room_config.round)
|
||||||
self._room.room_config.round)
|
|
||||||
else
|
|
||||||
self._view:GetChild("tex_round1").text = self._room.curren_round
|
|
||||||
self._view:GetChild("tex_round2").text = self._room.room_config.round
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:ShowJing()
|
function M:ShowJing()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue