退出房间
parent
53c2085bfc
commit
9fc9ba2315
|
|
@ -200,7 +200,15 @@ function M:_evtOnPush_assistant(...)
|
|||
return
|
||||
end
|
||||
|
||||
view:ChangeOther(tonumber(view._group.lev) + 1)
|
||||
local arg = {...}
|
||||
local groupId = arg[1].id
|
||||
local lev = arg[1].lev
|
||||
|
||||
if groupId ~= view._group.id then
|
||||
return
|
||||
end
|
||||
|
||||
view:ChangeOther(lev + 1)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ function M:init(url)
|
|||
BaseView.InitView(self, url)
|
||||
self._full_offset = false
|
||||
local view = self._view
|
||||
self.lastTime = 0
|
||||
self.lastTime = os.time()
|
||||
|
||||
self.com_FamilyChatRoom = FamilyChatRoom:Init(view:GetChild('com_chatRoom'), self)
|
||||
|
||||
|
|
@ -690,6 +690,11 @@ function M:OnUpdate()
|
|||
end)
|
||||
]]
|
||||
self.lastTime = newTime
|
||||
--self._view:GetChild('list_familyNumber').numItems = 0
|
||||
|
||||
if self._view:GetChild('list_familyNumber').itemRenderer then
|
||||
self._view:GetChild('list_familyNumber').numItems = #self._group.members
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,27 @@ local EXSettingView = {}
|
|||
local M = EXSettingView
|
||||
setmetatable(M, { __index = BaseWindow })
|
||||
|
||||
function EXSettingView.new(main_view)
|
||||
function EXSettingView:Show(room)
|
||||
self._room = room
|
||||
|
||||
-- 房主,第一个进房间的人
|
||||
local roomOwner = self._room.player_list[1].self_user.account_id
|
||||
|
||||
if roomOwner == DataManager.SelfUser.account_id then
|
||||
self.cBtn.selectedIndex = 1
|
||||
else
|
||||
self.cBtn.selectedIndex = 0
|
||||
end
|
||||
|
||||
BaseWindow.Show(self)
|
||||
end
|
||||
|
||||
function EXSettingView.new(main_view, flag_witness)
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = 'EXSettingView'
|
||||
self._close_destroy = true
|
||||
self._mainView = main_view
|
||||
self._flag_witness = flag_witness
|
||||
self:init('ui://Main_Majiang/Setting')
|
||||
return self
|
||||
end
|
||||
|
|
@ -23,6 +39,8 @@ function M:init(url)
|
|||
local btn_music = view:GetChild('btn_vedio_music')
|
||||
local btn_sound = view:GetChild('btn_vedio_sound')
|
||||
|
||||
self.cBtn = self._view:GetController('cBtn')
|
||||
|
||||
-- slider_sound.value = GameApplication.Instance.SoundValue
|
||||
-- slider_music.value = GameApplication.Instance.MusicValue
|
||||
|
||||
|
|
@ -46,14 +64,34 @@ function M:init(url)
|
|||
-- GameApplication.Instance.MusicMute = btn_music.selected;
|
||||
end)
|
||||
|
||||
local _btn_logout = self._view:GetChild('btn_closeRoom')
|
||||
local _btn_logout = self._view:GetChild('btn_cancelRoom')
|
||||
_btn_logout.onClick:Set(function()
|
||||
if self._flag_witness then
|
||||
local _room = DataManager.CurrenRoom
|
||||
pt(_room)
|
||||
self._mainView._gamectr:ExitWitnessGame(_room.play_id, _room.game_id,
|
||||
_room.room_id)
|
||||
ViewManager.ChangeView(ViewManager.View_Family)
|
||||
else
|
||||
if self._mainView.dismiss_room_cd_time > 0 then
|
||||
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
|
||||
else
|
||||
local _gamectr = ControllerManager.GetController(GameController)
|
||||
_gamectr:AskDismissRoom()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
self._view:GetChild("btn_closeRoom").onClick:Set(function()
|
||||
local _gamectr = ControllerManager.GetController(GameController)
|
||||
_gamectr:LevelRoom(function(res)
|
||||
print("退出房间")
|
||||
if res.ReturnCode ~= 0 then
|
||||
ViewUtil.ErrorTip(res.ReturnCode)
|
||||
return
|
||||
end
|
||||
ViewManager.ChangeView(ViewManager.View_Family)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,27 @@ local EXSettingView = {}
|
|||
local M = EXSettingView
|
||||
setmetatable(M, { __index = BaseWindow })
|
||||
|
||||
function EXSettingView.new(main_view)
|
||||
function EXSettingView:Show(room)
|
||||
self._room = room
|
||||
|
||||
-- 房主,第一个进房间的人
|
||||
local roomOwner = self._room.player_list[1].self_user.account_id
|
||||
|
||||
if roomOwner == DataManager.SelfUser.account_id then
|
||||
self.cBtn.selectedIndex = 1
|
||||
else
|
||||
self.cBtn.selectedIndex = 0
|
||||
end
|
||||
|
||||
BaseWindow.Show(self)
|
||||
end
|
||||
|
||||
function EXSettingView.new(main_view, flag_witness)
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = 'EXSettingView'
|
||||
self._close_destroy = true
|
||||
self._mainView = main_view
|
||||
self._flag_witness = flag_witness
|
||||
self:init('ui://Main_Majiang/Setting')
|
||||
return self
|
||||
end
|
||||
|
|
@ -23,6 +39,8 @@ function M:init(url)
|
|||
local btn_music = view:GetChild('btn_vedio_music')
|
||||
local btn_sound = view:GetChild('btn_vedio_sound')
|
||||
|
||||
self.cBtn = self._view:GetController('cBtn')
|
||||
|
||||
-- slider_sound.value = GameApplication.Instance.SoundValue
|
||||
-- slider_music.value = GameApplication.Instance.MusicValue
|
||||
|
||||
|
|
@ -46,14 +64,34 @@ function M:init(url)
|
|||
-- GameApplication.Instance.MusicMute = btn_music.selected;
|
||||
end)
|
||||
|
||||
local _btn_logout = self._view:GetChild('btn_closeRoom')
|
||||
local _btn_logout = self._view:GetChild('btn_cancelRoom')
|
||||
_btn_logout.onClick:Set(function()
|
||||
if self._flag_witness then
|
||||
local _room = DataManager.CurrenRoom
|
||||
pt(_room)
|
||||
self._mainView._gamectr:ExitWitnessGame(_room.play_id, _room.game_id,
|
||||
_room.room_id)
|
||||
ViewManager.ChangeView(ViewManager.View_Family)
|
||||
else
|
||||
if self._mainView.dismiss_room_cd_time > 0 then
|
||||
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
|
||||
else
|
||||
local _gamectr = ControllerManager.GetController(GameController)
|
||||
_gamectr:AskDismissRoom()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
self._view:GetChild("btn_closeRoom").onClick:Set(function()
|
||||
local _gamectr = ControllerManager.GetController(GameController)
|
||||
_gamectr:LevelRoom(function(res)
|
||||
print("退出房间")
|
||||
if res.ReturnCode ~= 0 then
|
||||
ViewUtil.ErrorTip(res.ReturnCode)
|
||||
return
|
||||
end
|
||||
ViewManager.ChangeView(ViewManager.View_Family)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<controller name="moreBtn" pages="0,,1," selected="0"/>
|
||||
<controller name="familyBan" pages="0,,1," selected="0"/>
|
||||
<controller name="cMyfamilyList" pages="0,,1," selected="0"/>
|
||||
<controller name="cIsChatRoom" pages="0,,1," selected="0">
|
||||
<controller name="cIsChatRoom" pages="0,,1," selected="1">
|
||||
<remark page="0" value="关闭聊天室"/>
|
||||
<remark page="1" value="打开聊天室"/>
|
||||
</controller>
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
<relation target="" sidePair="right-left,top-top,rightext-right"/>
|
||||
</image>
|
||||
<component id="n3_in3i" name="btn_close" src="in3i7cu9" fileName="Main/Component/btn_close.xml" xy="54,6" group="n17_in3i"/>
|
||||
<text id="n399_nq5b" name="n399" xy="199,26" size="203,97" group="n17_in3i" fontSize="30" align="center" autoSize="none" text="版本1.0.8"/>
|
||||
<image id="n392_f1fu" name="n392" src="yk1o7d3p" fileName="Main/Image/hall_club_common_tittle_icon1.png" xy="967,24" group="n395_f1fu">
|
||||
<relation target="n393_f1fu" sidePair="left-left"/>
|
||||
</image>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
|||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleName: base/common/af187115a4824290240734622129b80b
|
||||
assetBundleVariant:
|
||||
|
|
|
|||
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
|||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleName: base/common/af187115a4824290240734622129b80b
|
||||
assetBundleVariant:
|
||||
|
|
|
|||
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
|||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
|
||||
assetBundleVariant:
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
[
|
||||
{
|
||||
"ver": "1.0.29",
|
||||
"ver": "1.0.21",
|
||||
"name": "跑得快",
|
||||
"check": true,
|
||||
"version": "1.0.29",
|
||||
"version": "1.0.21",
|
||||
"game_id": "66",
|
||||
"bundle": "extend/poker/runfast"
|
||||
},
|
||||
|
|
@ -24,34 +24,34 @@
|
|||
"bundle": "extend/poker2/suoha"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.21",
|
||||
"ver": "1.0.22",
|
||||
"name": "南城麻将",
|
||||
"check": true,
|
||||
"version": "1.0.21",
|
||||
"version": "1.0.22",
|
||||
"game_id": "86",
|
||||
"bundle": "extend/majiang/nancheng"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.22",
|
||||
"ver": "1.0.23",
|
||||
"name": "黎川麻将",
|
||||
"check": true,
|
||||
"version": "1.0.22",
|
||||
"version": "1.0.23",
|
||||
"game_id": "87",
|
||||
"bundle": "extend/majiang/lichuan"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.17",
|
||||
"ver": "1.0.18",
|
||||
"name": "金溪麻将",
|
||||
"check": true,
|
||||
"version": "1.0.17",
|
||||
"version": "1.0.18",
|
||||
"game_id": "88",
|
||||
"bundle": "extend/majiang/jinxi"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.16",
|
||||
"ver": "1.0.17",
|
||||
"name": "抚州麻将",
|
||||
"check": true,
|
||||
"version": "1.0.16",
|
||||
"version": "1.0.17",
|
||||
"game_id": "89",
|
||||
"bundle": "extend/majiang/fuzhou"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ PlayerSettings:
|
|||
iPhone: 1
|
||||
AndroidBundleVersionCode: 12
|
||||
AndroidMinSdkVersion: 26
|
||||
AndroidTargetSdkVersion: 30
|
||||
AndroidTargetSdkVersion: 26
|
||||
AndroidPreferredInstallLocation: 1
|
||||
aotOptions:
|
||||
stripEngineCode: 0
|
||||
|
|
@ -787,7 +787,7 @@ PlayerSettings:
|
|||
platformArchitecture:
|
||||
iPhone: 1
|
||||
scriptingBackend:
|
||||
Android: 1
|
||||
Android: 0
|
||||
Standalone: 1
|
||||
iPhone: 1
|
||||
il2cppCompilerConfiguration: {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue