master
parent
92b0f00b4f
commit
5e70f28a72
|
|
@ -598,10 +598,25 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
||||||
end
|
end
|
||||||
local all_num = #playList + #roomList
|
local all_num = #playList + #roomList
|
||||||
list_room.itemRenderer = function(index, obj)
|
list_room.itemRenderer = function(index, obj)
|
||||||
if index < #readyRoom then
|
if index < #roomList then
|
||||||
local newIndex = index + 1
|
local newIndex = index + 1
|
||||||
local playInfo = self._group:getPlay(roomList[newIndex].pid)
|
local playInfo = self._group:getPlay(roomList[newIndex].pid)
|
||||||
|
-- self:FillSameRoomInfo(newIndex, obj, 1, playInfo)
|
||||||
|
local gameId = playInfo.gameId
|
||||||
|
local config = ExtendManager.GetExtendConfig(gameId)
|
||||||
|
local mode = config:GetGameInfo()
|
||||||
|
local gamePlay = mode:LoadConfigToDetail(playInfo.config, playInfo.hpData)
|
||||||
|
obj:GetChild('Label_gameRule').title = gamePlay
|
||||||
|
local roomName = playInfo.name
|
||||||
|
roomName = Utils.TextOmit(roomName, 6, "")
|
||||||
|
obj:GetChild('game_type').emojies = EmojiDitc.EmojiesDitc
|
||||||
|
obj:GetChild('game_type').text = string.format("(%s)%s", playInfo.game_name, roomName)
|
||||||
|
obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 1
|
||||||
|
obj:GetController('num').selectedIndex = roomList[newIndex].maxPlayers - 2
|
||||||
|
-- if self._group.isWatch == 1 then
|
||||||
|
-- 允许观战
|
||||||
|
obj:GetController('type').selectedIndex = self._group.isWatch or 1
|
||||||
|
-- end
|
||||||
local plist = roomList[newIndex].plist
|
local plist = roomList[newIndex].plist
|
||||||
local insertName = ""
|
local insertName = ""
|
||||||
for i = 1, #plist do
|
for i = 1, #plist do
|
||||||
|
|
@ -663,8 +678,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
||||||
-- self._gamectr = ControllerManager.GetController(GameController)
|
-- self._gamectr = ControllerManager.GetController(GameController)
|
||||||
-- self._gamectr:WitnessGame(DataManager.SelfUser.account_id, id, roomList[newIndex].id)
|
-- self._gamectr:WitnessGame(DataManager.SelfUser.account_id, id, roomList[newIndex].id)
|
||||||
end)
|
end)
|
||||||
elseif index >= all_num - #startRoom then
|
-- elseif index >= all_num - #startRoom then
|
||||||
|
|
||||||
else
|
else
|
||||||
local newIndex = index - #readyRoom + 1
|
local newIndex = index - #readyRoom + 1
|
||||||
local config = ExtendManager.GetExtendConfig(playList[newIndex].gameId)
|
local config = ExtendManager.GetExtendConfig(playList[newIndex].gameId)
|
||||||
|
|
@ -725,7 +739,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:FillSameRoomInfo(newIndex, obj, playInfo)
|
function M:FillSameRoomInfo(newIndex, obj, type, playInfo)
|
||||||
local gameId = playInfo.gameId
|
local gameId = playInfo.gameId
|
||||||
local config = ExtendManager.GetExtendConfig(gameId)
|
local config = ExtendManager.GetExtendConfig(gameId)
|
||||||
local mode = config:GetGameInfo()
|
local mode = config:GetGameInfo()
|
||||||
|
|
@ -734,7 +748,7 @@ function M:FillSameRoomInfo(newIndex, obj, playInfo)
|
||||||
local roomName = playInfo.name
|
local roomName = playInfo.name
|
||||||
roomName = Utils.TextOmit(roomName, 6, "")
|
roomName = Utils.TextOmit(roomName, 6, "")
|
||||||
obj:GetChild('game_type').emojies = EmojiDitc.EmojiesDitc
|
obj:GetChild('game_type').emojies = EmojiDitc.EmojiesDitc
|
||||||
obj:GetChild('game_type').text = string.format("(%s)%s", playInfo.game_name, roomName, roomList[newIndex].id)
|
obj:GetChild('game_type').text = string.format("(%s)%s", playInfo.game_name, roomName)
|
||||||
obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 1
|
obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 1
|
||||||
obj:GetController('num').selectedIndex = roomList[newIndex].maxPlayers - 2
|
obj:GetController('num').selectedIndex = roomList[newIndex].maxPlayers - 2
|
||||||
-- if self._group.isWatch == 1 then
|
-- if self._group.isWatch == 1 then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue