master
parent
92b0f00b4f
commit
5e70f28a72
|
|
@ -598,10 +598,25 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
end
|
||||
local all_num = #playList + #roomList
|
||||
list_room.itemRenderer = function(index, obj)
|
||||
if index < #readyRoom then
|
||||
if index < #roomList then
|
||||
local newIndex = index + 1
|
||||
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 insertName = ""
|
||||
for i = 1, #plist do
|
||||
|
|
@ -663,8 +678,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
-- self._gamectr = ControllerManager.GetController(GameController)
|
||||
-- self._gamectr:WitnessGame(DataManager.SelfUser.account_id, id, roomList[newIndex].id)
|
||||
end)
|
||||
elseif index >= all_num - #startRoom then
|
||||
|
||||
-- elseif index >= all_num - #startRoom then
|
||||
else
|
||||
local newIndex = index - #readyRoom + 1
|
||||
local config = ExtendManager.GetExtendConfig(playList[newIndex].gameId)
|
||||
|
|
@ -725,7 +739,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
end
|
||||
end
|
||||
|
||||
function M:FillSameRoomInfo(newIndex, obj, playInfo)
|
||||
function M:FillSameRoomInfo(newIndex, obj, type, playInfo)
|
||||
local gameId = playInfo.gameId
|
||||
local config = ExtendManager.GetExtendConfig(gameId)
|
||||
local mode = config:GetGameInfo()
|
||||
|
|
@ -734,7 +748,7 @@ function M:FillSameRoomInfo(newIndex, obj, playInfo)
|
|||
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, 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:GetController('num').selectedIndex = roomList[newIndex].maxPlayers - 2
|
||||
-- if self._group.isWatch == 1 then
|
||||
|
|
|
|||
Loading…
Reference in New Issue