From 0e262ec7bc186588f97fbb26f7649fa5ab853766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Sat, 26 Apr 2025 16:16:02 +0800 Subject: [PATCH] =?UTF-8?q?bg=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/majiang/fuzhou/EXMainView.lua | 74 +++++++++---------- .../extend/majiang/lichuan/EXMainView.lua | 72 +++++++++--------- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua index 09892075..a49147f1 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua @@ -11,10 +11,10 @@ local M = {} local bg_config = { - { id = 1, url = "extend/majiang/nancheng/bg/bg1", thumb = "ui://Extend_MJ_NanCheng/bg1" }, - { id = 2, url = "extend/majiang/nancheng/bg/bg2", thumb = "ui://Extend_MJ_NanCheng/bg2" }, - { id = 3, url = "extend/majiang/nancheng/bg/bg3", thumb = "ui://Extend_MJ_NanCheng/bg3" }, - { id = 4, url = "extend/majiang/nancheng/bg/bg4", thumb = "ui://Extend_MJ_NanCheng/bg4" } + { id = 1, url = "extend/majiang/fuzhou/bg/bg1", thumb = "ui://Extend_MJ_FuZhou/bg1" }, + { id = 2, url = "extend/majiang/fuzhou/bg/bg2", thumb = "ui://Extend_MJ_FuZhou/bg2" }, + { id = 3, url = "extend/majiang/fuzhou/bg/bg3", thumb = "ui://Extend_MJ_FuZhou/bg3" }, + { id = 4, url = "extend/majiang/fuzhou/bg/bg4", thumb = "ui://Extend_MJ_FuZhou/bg4" } } --- Create a new ZZ_MainView function M.new() @@ -108,40 +108,40 @@ function M:InitView(url) end) 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 + 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) + end + ) + _curren_msg:Show() + --]] + end) btn_closeRoom.onClick:Add(handler(self, function() local settingView = SettingView.new(self) @@ -157,7 +157,7 @@ function M:InitView(url) end 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 local list_card = _gang_tip_choice:GetChild("list_card") diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua index bec2a877..827af139 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua @@ -11,10 +11,10 @@ local M = {} local bg_config = { - { id = 1, url = "extend/majiang/nancheng/bg/bg1", thumb = "ui://Extend_MJ_NanCheng/bg1" }, - { id = 2, url = "extend/majiang/nancheng/bg/bg2", thumb = "ui://Extend_MJ_NanCheng/bg2" }, - { id = 3, url = "extend/majiang/nancheng/bg/bg3", thumb = "ui://Extend_MJ_NanCheng/bg3" }, - { id = 4, url = "extend/majiang/nancheng/bg/bg4", thumb = "ui://Extend_MJ_NanCheng/bg4" } + { id = 1, url = "extend/majiang/lichuan/bg/bg1", thumb = "ui://Extend_MJ_LiChuan/bg1" }, + { id = 2, url = "extend/majiang/lichuan/bg/bg2", thumb = "ui://Extend_MJ_LiChuan/bg2" }, + { id = 3, url = "extend/majiang/lichuan/bg/bg3", thumb = "ui://Extend_MJ_LiChuan/bg3" }, + { id = 4, url = "extend/majiang/lichuan/bg/bg4", thumb = "ui://Extend_MJ_LiChuan/bg4" } } --- Create a new ZZ_MainView function M.new() @@ -106,40 +106,40 @@ function M:InitView(url) end) 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 + 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) + end + ) + _curren_msg:Show() + --]] + end) btn_closeRoom.onClick:Add(handler(self, function() local settingView = SettingView.new(self)