bg修改
parent
5bb5f1774b
commit
0e262ec7bc
|
|
@ -11,10 +11,10 @@ local M = {}
|
||||||
|
|
||||||
|
|
||||||
local bg_config = {
|
local bg_config = {
|
||||||
{ id = 1, url = "extend/majiang/nancheng/bg/bg1", thumb = "ui://Extend_MJ_NanCheng/bg1" },
|
{ id = 1, url = "extend/majiang/fuzhou/bg/bg1", thumb = "ui://Extend_MJ_FuZhou/bg1" },
|
||||||
{ id = 2, url = "extend/majiang/nancheng/bg/bg2", thumb = "ui://Extend_MJ_NanCheng/bg2" },
|
{ id = 2, url = "extend/majiang/fuzhou/bg/bg2", thumb = "ui://Extend_MJ_FuZhou/bg2" },
|
||||||
{ id = 3, url = "extend/majiang/nancheng/bg/bg3", thumb = "ui://Extend_MJ_NanCheng/bg3" },
|
{ id = 3, url = "extend/majiang/fuzhou/bg/bg3", thumb = "ui://Extend_MJ_FuZhou/bg3" },
|
||||||
{ id = 4, url = "extend/majiang/nancheng/bg/bg4", thumb = "ui://Extend_MJ_NanCheng/bg4" }
|
{ id = 4, url = "extend/majiang/fuzhou/bg/bg4", thumb = "ui://Extend_MJ_FuZhou/bg4" }
|
||||||
}
|
}
|
||||||
--- Create a new ZZ_MainView
|
--- Create a new ZZ_MainView
|
||||||
function M.new()
|
function M.new()
|
||||||
|
|
@ -108,40 +108,40 @@ 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()
|
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)
|
||||||
|
|
@ -157,7 +157,7 @@ function M:InitView(url)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:__BuGang(cardInfo, callback)
|
function M:__BuGang(cardInfo, callback)
|
||||||
local _gang_tip_choice = UIPackage.CreateObject("Extend_MJ_NanCheng", "Gang_tip_choice")
|
local _gang_tip_choice = UIPackage.CreateObject("Extend_MJ_FuZhou", "Gang_tip_choice")
|
||||||
_gang_tip_choice.visible = true
|
_gang_tip_choice.visible = true
|
||||||
|
|
||||||
local list_card = _gang_tip_choice:GetChild("list_card")
|
local list_card = _gang_tip_choice:GetChild("list_card")
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,10 @@ local M = {}
|
||||||
|
|
||||||
|
|
||||||
local bg_config = {
|
local bg_config = {
|
||||||
{ id = 1, url = "extend/majiang/nancheng/bg/bg1", thumb = "ui://Extend_MJ_NanCheng/bg1" },
|
{ id = 1, url = "extend/majiang/lichuan/bg/bg1", thumb = "ui://Extend_MJ_LiChuan/bg1" },
|
||||||
{ id = 2, url = "extend/majiang/nancheng/bg/bg2", thumb = "ui://Extend_MJ_NanCheng/bg2" },
|
{ id = 2, url = "extend/majiang/lichuan/bg/bg2", thumb = "ui://Extend_MJ_LiChuan/bg2" },
|
||||||
{ id = 3, url = "extend/majiang/nancheng/bg/bg3", thumb = "ui://Extend_MJ_NanCheng/bg3" },
|
{ id = 3, url = "extend/majiang/lichuan/bg/bg3", thumb = "ui://Extend_MJ_LiChuan/bg3" },
|
||||||
{ id = 4, url = "extend/majiang/nancheng/bg/bg4", thumb = "ui://Extend_MJ_NanCheng/bg4" }
|
{ id = 4, url = "extend/majiang/lichuan/bg/bg4", thumb = "ui://Extend_MJ_LiChuan/bg4" }
|
||||||
}
|
}
|
||||||
--- Create a new ZZ_MainView
|
--- Create a new ZZ_MainView
|
||||||
function M.new()
|
function M.new()
|
||||||
|
|
@ -106,40 +106,40 @@ 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()
|
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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue