diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua index 55cb2f33..975ba150 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua @@ -18,29 +18,33 @@ GroupNumberInputView_Game = import(".MngView.GroupNumberInputView") local GroupInfoView = {} local M = GroupInfoView -local currentSelectPlay=0 +local currentSelectPlay = 0 function GroupInfoView.new(curGroup, fg_info, root_view, groupMainView) - setmetatable(M, {__index = BaseView}) - local self = setmetatable({}, {__index = M}) + setmetatable(M, { __index = BaseView }) + local self = setmetatable({}, { __index = M }) self.class = 'GroupInfoView' self.curGroup = curGroup curGroup.layer = 0 self.fg_info = fg_info - self._root_view_for_embed = root_view -- 保存根视图引用,用于嵌入列表页 - self._groupMainView_to_embed = groupMainView -- 保存要嵌入的列表页实例 + self._root_view_for_embed = root_view + self._groupMainView_to_embed = groupMainView self.roominfo = {} self.gameIdList = {} self.playIdList = {} + + -- (是否置顶) + self.pinnedPlays = {} + self._full = true - self._get_data = false -- 标记是否已获取到数据 + self._get_data = false self._showVipRooms = 0 self.lstgameVisible = false self.isShowRoomItem = (self.curGroup.lev == 1 or self.curGroup.lev == 2) DataManager.SelfUser.cur_group = self - self.FillGameItemList={} + self.FillGameItemList = {} self:InitView('ui://NewGroup/Main_GroupInfo') - + return self end @@ -54,7 +58,7 @@ local function __getLayerName(self, pid) --end local p_data = self.curGroup:getPlay(pid) return p_data and p_data.name or '已删除' -end +end -- 获取玩法名 local function __getLayerName1(self, pid) if pid == 0 then @@ -121,7 +125,7 @@ local function RoomWeight1(room) elseif #room.plist == 0 then weight = weight + 0 elseif room.maxPlayers > #room.plist then - weight = 0.5--weight + (10 - room.maxPlayers + #room.plist) + weight = 0.5 --weight + (10 - room.maxPlayers + #room.plist) elseif room.maxPlayers == #room.plist then weight = weight + 1 end @@ -132,23 +136,23 @@ end -- 房间排序 local function SortRooms(a, b) - if currentSelectPlay==0 then - local rwa = RoomWeight(a) - local rwb = RoomWeight(b) - if rwa ~= rwb then - return rwa > rwb - else - return a.pid rwb + else + return a.pid < b.pid + end + else + local rwa = RoomWeight1(a) + local rwb = RoomWeight1(b) + if rwa ~= rwb then + return rwa < rwb + else + return a.pid < b.pid + end + end end -- 填充房间对象 @@ -173,30 +177,30 @@ local function __fillRoomItem(self, index, item, room) local room_item = self.roomItems[item] local play = self.curGroup:getPlay(room.pid) if not room_item then - room_item = RoomItem.new(item, room.maxPlayers,self.isShowRoomItem) + room_item = RoomItem.new(item, room.maxPlayers, self.isShowRoomItem) self.roomItems[item] = room_item end - + room_item:SetPlay(play) - -- local str="(人数:".. room.maxPlayers - -- if room.limitInRoom then - -- str=str.." 限制积分:"..d2ad(room.limitInRoom) ..")" - -- else - -- str=str..")" - -- end - - + -- local str="(人数:".. room.maxPlayers + -- if room.limitInRoom then + -- str=str.." 限制积分:"..d2ad(room.limitInRoom) ..")" + -- else + -- str=str..")" + -- end + + local str = "" if room.limitInRoom then - str = d2ad(str..room.limitInRoom) + str = d2ad(str .. room.limitInRoom) end - if room.round==nil then - room.round=0 - end - - - room_item.tex_round.text = room.status >=-1 and string.format('%s/%s', room.round, room.times) or "" + if room.round == nil then + room.round = 0 + end + + + room_item.tex_round.text = room.status >= -1 and string.format('%s/%s', room.round, room.times) or "" local name = __getLayerName(self, room.pid) room_item.tex_gamename.text = name room_item.tex_limit.text = str @@ -219,7 +223,7 @@ local function __fillRoomItem(self, index, item, room) if config.isHidden and config.isHidden == 1 then isHidden = 1 end - end + end play.isHidden = isHidden end room_item.ctr_color.selectedIndex = play and play.deskId or room.color or 0 @@ -238,15 +242,14 @@ local function __fillRoomItem(self, index, item, room) if isHidden == 0 then p_head.tex_name.text = ViewUtil.stringEllipsis(p.nick) - p_head.tex_id.text = "ID:"..p.aid + p_head.tex_id.text = "ID:" .. p.aid ImageLoad.Load(p.portrait, btn_head._iconObject, self.class) - - if p.hp then - local str1="积分:" - local hp=p.hp/100 - p_head.text_score.text=str1..hp - end - + + if p.hp then + local str1 = "积分:" + local hp = p.hp / 100 + p_head.text_score.text = str1 .. hp + end else p_head.tex_name.text = "智能" p_head.tex_id.text = "防作弊" @@ -274,13 +277,13 @@ local function __fillRoomItem(self, index, item, room) p_item.visible = false end end - -- desk.touchable = false + -- desk.touchable = false desk.onClick:Set( function() if room.default or self.curGroup.lev == 3 then -- 房间点击:假房间 匹配,真房间 加入 if room.default or isHidden == 1 then - self:__startGame(room.id,room.pid, true, isHidden) + self:__startGame(room.id, room.pid, true, isHidden) else self:__joinRoom(roomid) end @@ -299,7 +302,7 @@ local function __fillRoomItem(self, index, item, room) function() riv:Dispose() if room.default or isHidden == 1 then - self:__startGame(room.id,room.pid, true, isHidden) + self:__startGame(room.id, room.pid, true, isHidden) else self:__joinRoom(roomid) end @@ -309,15 +312,15 @@ local function __fillRoomItem(self, index, item, room) function() local _curren_msg = MsgWindow.new( - self._root_view, - '确定解散该桌子吗?\r(解散该桌子没有任何结算信息,请谨慎操作)', - MsgWindow.MsgMode.OkAndCancel - ) + self._root_view, + '确定解散该桌子吗?\r(解散该桌子没有任何结算信息,请谨慎操作)', + MsgWindow.MsgMode.OkAndCancel + ) _curren_msg.onOk:Add( function() ViewUtil.ShowModalWait(self._root_view) local fgCtr = ControllerManager.GetController(NewGroupController) - + fgCtr:FG_RemoveRoom( self.curGroup.id, roomid, @@ -347,14 +350,13 @@ local function __fillRoomItem(self, index, item, room) self._view:AddChild(riv) riv:Center() end - - - local key = tostring(self.curGroup.id) + + + local key = tostring(self.curGroup.id) self.fg_info[key] = room.pid local filename = 'fginfo_' .. DataManager.SelfUser.account_id Utils.SaveLocalFile(filename, json.encode(self.fg_info)) - - end + end ) end @@ -377,12 +379,12 @@ local function __fillRoomData(self) local currentPlayID = self:GetSelectedPlayID() local currentGameID = self:GetSelectedGameID() - -- self.lst_layer.visible = currentGameID > 0 + -- self.lst_layer.visible = currentGameID > 0 --self.line1.visible = currentGameID > 0 if currentPlayID > 0 then local rooms = self.curGroup:getPlay(currentPlayID).rooms local trooms = {} - for i=1,#rooms do + for i = 1, #rooms do local room = rooms[i] local play = self.curGroup:getPlay(room.pid) local isvip = 0 @@ -404,24 +406,21 @@ local function __fillRoomData(self) isHidden = 1 end end - play.isHidden = isHidden + play.isHidden = isHidden play.isvip = isvip - - - ----------- - if isvip == self._showVipRooms then - if isHidden == 1 then - if #room.plist == room.maxPlayers or self.curGroup.lev < 3 then - table.insert( trooms,room ) - end - else - table.insert( trooms,room ) - end - end - - + + + ----------- + if isvip == self._showVipRooms then + if isHidden == 1 then + if #room.plist == room.maxPlayers or self.curGroup.lev < 3 then + table.insert(trooms, room) + end + else + table.insert(trooms, room) + end + end end - end self.curRooms = membe_clone(trooms) @@ -436,32 +435,30 @@ local function __fillRoomData(self) if config.isvip and config.isvip == 1 then isvip = 1 end - end + end play.isvip = isvip - - ------ - if isvip == self._showVipRooms then - local hp=json.decode(play.hpData) - if hp and hp.maxRound then - room.times=hp.maxRound - end - - if hp and hp.limitInRoom then - room.limitInRoom=hp.limitInRoom - end - - - table.insert( self.curRooms,room ) - - end - ----- + + ------ + if isvip == self._showVipRooms then + local hp = json.decode(play.hpData) + if hp and hp.maxRound then + room.times = hp.maxRound + end + + if hp and hp.limitInRoom then + room.limitInRoom = hp.limitInRoom + end + + + table.insert(self.curRooms, room) + end + ----- end - else if currentGameID == 0 then local rooms = curGroup.rooms local trooms = {} - for i=1,#rooms do + for i = 1, #rooms do local room = rooms[i] local play = self.curGroup:getPlay(room.pid) local isvip = 0 @@ -483,28 +480,26 @@ local function __fillRoomData(self) isHidden = 1 end end - play.isHidden = isHidden + play.isHidden = isHidden play.isvip = isvip - - ----- - if isvip == self._showVipRooms then - if play.isHidden == 1 then - if #room.plist == room.maxPlayers or self.curGroup.lev < 3 then - table.insert( trooms,room ) - end - else - table.insert( trooms,room ) - end - end - + + ----- + if isvip == self._showVipRooms then + if play.isHidden == 1 then + if #room.plist == room.maxPlayers or self.curGroup.lev < 3 then + table.insert(trooms, room) + end + else + table.insert(trooms, room) + end + end end - end self.curRooms = membe_clone(trooms) - + for i = 1, #self.curGroup.playList do local defaultRoom = self.curGroup.default_rooms[i] - + local play = self.curGroup:getPlay(defaultRoom.pid) local isvip = 0 if play then @@ -515,25 +510,24 @@ local function __fillRoomData(self) if config.isvip and config.isvip == 1 then isvip = 1 end - end + end play.isvip = isvip end if isvip == self._showVipRooms then - local hp=json.decode(self.curGroup.playList[i].hpData) - defaultRoom.limitInRoom=hp.limitInRoom - if hp.maxRound then - defaultRoom.times=hp.maxRound - end - local totalNum=1 - if hp.tex_times_room then - totalNum=d2ad(hp.tex_times_room) - end - - for i=1,totalNum do - self.curRooms[#self.curRooms + 1] = defaultRoom - end - - end + local hp = json.decode(self.curGroup.playList[i].hpData) + defaultRoom.limitInRoom = hp.limitInRoom + if hp.maxRound then + defaultRoom.times = hp.maxRound + end + local totalNum = 1 + if hp.tex_times_room then + totalNum = d2ad(hp.tex_times_room) + end + + for i = 1, totalNum do + self.curRooms[#self.curRooms + 1] = defaultRoom + end + end end else self.curRooms = {} @@ -556,7 +550,7 @@ local function __fillRoomData(self) if config.isHidden and config.isHidden == 1 then isHidden = 1 end - end + end p_data.isvip = isvip p_data.isHidden = isHidden @@ -573,44 +567,42 @@ local function __fillRoomData(self) self.curRooms[#self.curRooms + 1] = tempRoom end end - end - - local hp=json.decode(p_data.hpData) - if hp and hp.maxRound then - self.curGroup.default_rooms[i].times=hp.maxRound - end - - if hp and hp.limitInRoom then - self.curGroup.default_rooms[i].limitInRoom=hp.limitInRoom - end - - local totalNum=1 - if hp and hp.tex_times_room then - totalNum=d2ad(hp.tex_times_room) - end - for j=1,totalNum do - self.curRooms[#self.curRooms + 1] = self.curGroup.default_rooms[i] - end - + end + + local hp = json.decode(p_data.hpData) + if hp and hp.maxRound then + self.curGroup.default_rooms[i].times = hp.maxRound + end + + if hp and hp.limitInRoom then + self.curGroup.default_rooms[i].limitInRoom = hp.limitInRoom + end + + local totalNum = 1 + if hp and hp.tex_times_room then + totalNum = d2ad(hp.tex_times_room) + end + for j = 1, totalNum do + self.curRooms[#self.curRooms + 1] = self.curGroup.default_rooms[i] + end end end end end - - currentSelectPlay=self:GetSelectedPlayID() - table.sort(self.curRooms,SortRooms ) + + currentSelectPlay = self:GetSelectedPlayID() + table.sort(self.curRooms, SortRooms) list_offline = {} if self.curGroup.lev < 3 then self.lst_room.numItems = #self.curRooms else if self.curGroup.show_num > 0 and #self.curRooms > self.curGroup.show_num then - local tr = {} for j = 1, #self.curRooms do if #tr < self.curGroup.show_num or self.curRooms[j].default == true then - table.insert(tr,self.curRooms[j]) + table.insert(tr, self.curRooms[j]) end end @@ -618,8 +610,8 @@ local function __fillRoomData(self) end self.lst_room.numItems = #self.curRooms end - - + + -- if self._ctr_search.selectedIndex == 1 then -- self.lst_room_search:RemoveChildrenToPool() @@ -653,6 +645,7 @@ end function M:InitRoomInfoView() local room = self.roominfo.room + if not room.default then self.roominfo.view:GetChild('tex_round').text = string.format('(%s/%s)', room.round, room.times) local lst_player = self.roominfo.view:GetChild('lst_player') @@ -663,10 +656,12 @@ function M:InitRoomInfoView() local item = lst_player:AddItemFromPool() item:GetChild('tex_name').text = ViewUtil.stringEllipsis(p.nick) local play = self.curGroup:getPlay(room.pid) + -- local score = play.hpOnOff == 0 and p.score or d2ad(p.score * play.hp_times) -- score = score >= 0 and '+' .. score or score -- item:GetController('nega').selectedIndex = p.score >= 0 and 0 or 1 -- item:GetChild('tex_score').text = score + item:GetChild('tex_score').visible = false ImageLoad.Load(p.portrait, item:GetChild('btn_head')._iconObject, self.class) end @@ -695,49 +690,75 @@ local function __fillPlayItem(self, index, item) local tex_jutifenleiName = item:GetChild('tex_jutifenleiName') local pipeijoin = item:GetChild('pipeijoin') local tex_paiming = item:GetChild('tex_paiming') - - if (index == 0) then - tex_game.text = __getLayerName(self, 0) - tex_jutifenleiName.text = __getLayerName1(self,0) - tex_paiming.text = "1" - else - - pipeijoin.onClick:Add( - function() - local currentPlayID = self:GetSelectedPlayID() - if currentPlayID == 0 then - if self.lst_layer.selectedIndex == 0 and self.lst_game.selectedIndex > 0 then - local pid = self.fg_info[tostring(self.curGroup.id)] - if pid == 0 then - ViewUtil.ErrorTip(nil, '没有选择玩法') - return - end - local p_data = self.curGroup:getPlay(pid) - local currentGameID = self:GetSelectedGameID() - if currentGameID == p_data.gameId then - currentPlayID = pid - end - end - if currentPlayID == 0 then - ViewUtil.ErrorTip(nil, '没有选择玩法') - return - end - end + -- 获取置顶控制器和按钮 + local ctr_isZhiDing = item:GetController('isZhiDing') + local btn_pin = item:GetChild('btn_pin') - self:__startGame("",currentPlayID, false) - end - ) - tex_game.text = __getLayerName(self, self.playIdList[index]) - tex_jutifenleiName.text = __getLayerName1(self,self.playIdList[index]) - tex_paiming.text = index - + local playId = self.playIdList[index + 1] + + if not playId then + item.visible = false + return end + + item.visible = true + + -- 处理“全部”选项 (playId == 0) + if playId == 0 then + tex_game.text = "全 部" + tex_jutifenleiName.text = "全 部" + tex_paiming.text = "0" -- 全部不显示排名 + + -- 隐藏置顶相关UI + if ctr_isZhiDing then + ctr_isZhiDing.selectedIndex = 2 -- 默认未置顶状态 + end + if btn_pin then + --btn_pin.grayed = true --设置按钮变灰 + btn_pin.touchable = false -- 禁止点击,防止误触 + end + + -- 绑定点击事件:选择全部 + pipeijoin.onClick:Set(function() + --刷新房间列表 + self:__loadPlayData() + end) + + return + end + -- 设置置顶控制器状态 + if ctr_isZhiDing then + local isPinned = self.pinnedPlays[playId] + ctr_isZhiDing.selectedIndex = isPinned and 1 or 0 + if btn_pin then + btn_pin.visible = true + end + end + + -- 绑定置顶按钮点击事件 + if btn_pin then + btn_pin.onClick:Set(function() + self:_togglePinPlay(playId) + end) + end + + pipeijoin.onClick:Set(function() + local currentPlayID = self:GetSelectedPlayID() + if currentPlayID == 0 then + ViewUtil.ErrorTip(nil, '请选择具体玩法') + return + end + self:__startGame("", currentPlayID, false) + end) + + tex_game.text = __getLayerName(self, playId) + tex_jutifenleiName.text = __getLayerName1(self, playId) + tex_paiming.text = index end local _iconMap = {} local function __fillExtendIcon(id, callback) - local File = System.IO.File local path = Application.persistentDataPath .. '/UserData/Icon' if not System.IO.Directory.Exists(path) then @@ -771,7 +792,7 @@ local function __fillExtendIcon(id, callback) local texture = UnityEngine.Texture2D(128, 128) texture:LoadImage(bytes) local ntexture = FairyGUI.NTexture(texture) - _iconMap[id] = {texture = texture, ntexture = ntexture} + _iconMap[id] = { texture = texture, ntexture = ntexture } callback(ntexture) end ) @@ -782,74 +803,88 @@ local function __fillExtendIcon(id, callback) local texture = UnityEngine.Texture2D(128, 128) texture:LoadImage(bytes) local ntexture = FairyGUI.NTexture(texture) - _iconMap[id] = {texture = texture, ntexture = ntexture} + _iconMap[id] = { texture = texture, ntexture = ntexture } callback(ntexture) end end end local function GetGameName(index) - if index==0 then return "全 部" end - local list = DataManager.SelfUser.games - - for k,v in ipairs(list) do - if v.game_id==index then - return v.name - end - end - return "" + if index == 0 then return "全 部" end + local list = DataManager.SelfUser.games + + for k, v in ipairs(list) do + if v.game_id == index then + return v.name + end + end + return "" end -- 玩法名字显示 local function __fillGameItem(self, index, item) - local gameName="" + local gameName = "" if (index == 0) then item.icon = 'ui://NewGroup/quyxtb' - gameName=GetGameName(0) - item:GetChild("n11").text=gameName - item:GetChild("n22").text=gameName - if self.currentGameItemName==nil then - item.icon = 'ui://NewGroup/quyxtb-1' - end + gameName = GetGameName(0) + item:GetChild("n11").text = gameName + item:GetChild("n22").text = gameName + if self.currentGameItemName == nil then + item.icon = 'ui://NewGroup/quyxtb-1' + end else local gameId = self.gameIdList[index] - printlog("--------------------name------------------------gameType",index) - pt(self.gameIdList) local config = ExtendManager.GetExtendConfig(gameId) local mode = config:GetGameInfo() - local iconName=mode:GetIconUrl1() + local iconName = mode:GetIconUrl1() item.icon = iconName - gameName=GetGameName(gameId) - item:GetChild("n11").text=gameName - item:GetChild("n22").text=gameName + gameName = GetGameName(gameId) + item:GetChild("n11").text = gameName + item:GetChild("n22").text = gameName + end + + if item.icon == self.currentGameItemName then + item.icon = self.currentGameItemName .. "-1" + item:GetChild("n11").text = gameName + item:GetChild("n22").text = gameName end - - if item.icon==self.currentGameItemName then - item.icon=self.currentGameItemName.."-1" - item:GetChild("n11").text=gameName - item:GetChild("n22").text=gameName - end - - end local function __analysePlayListData(self) self.playIdList = {} - DataManager.SelfUser.PlayLocalList={} - - local playName="playfaconfig"..self.curGroup.id - local json_data = Utils.LoadLocalFile(playName) + DataManager.SelfUser.PlayLocalList = {} + + local playName = "playfaconfig" .. self.curGroup.id + local json_data = Utils.LoadLocalFile(playName) if json_data then - local data = json.decode(json_data) - DataManager.SelfUser.PlayLocalList=data - end - - - - local count = 0 + local data = json.decode(json_data) + DataManager.SelfUser.PlayLocalList = data + end + + -- 获取当前选中的分类类型 (0=全部, 1=麻将, 2=扑克, 3=字牌) + local selectType = 0 + if self.ctr_fennlieM then + selectType = self.ctr_fennlieM.selectedIndex + end + local curGroup = self.curGroup local gameid = self:GetSelectedGameID() + + -- 构建 gameId 到 gameType 的映射表 + local gameTypeMap = {} + for k, v in pairs(DataManager.SelfUser.games) do + if v.game_id and v.gameType then + gameTypeMap[v.game_id] = tonumber(v.gameType) + end + end + + -- 首先添加“全部”选项,ID设为0 + table.insert(self.playIdList, 0) + + -- 临时表,用于存储符合条件的具体玩法及其原始索引 + local tempPlayList = {} + for i = 1, #curGroup.playList do local p_data = curGroup.playList[i] local isvip = 0 @@ -860,24 +895,100 @@ local function __analysePlayListData(self) if config.isvip and config.isvip == 1 then isvip = 1 end - end + end p_data.isvip = isvip - - local isHasPlayC=true - --[[for k,v in pairs(DataManager.SelfUser.PlayLocalList) do - if tonumber(k)==p_data.id then - isHasPlayC=v - end - end--]] - - if (gameid == 0 or p_data.gameId == gameid) and isHasPlayC and isvip == self._showVipRooms then - count = count + 1 - self.playIdList[count] = p_data.id + + local isHasPlayC = true + + -- 分类筛选逻辑 + local matchType = false + if selectType == 0 then + -- 0 表示全部,直接匹配 + matchType = true + else + local currentGameType = gameTypeMap[p_data.gameId] + if currentGameType and currentGameType == selectType then + matchType = true + end + end + + -- 筛选条件:游戏ID匹配、VIP状态匹配、分类匹配 + if (gameid == 0 or p_data.gameId == gameid) and isHasPlayC and isvip == self._showVipRooms and matchType then + table.insert(tempPlayList, { + id = p_data.id, + originalIndex = i -- 记录原始位置,用于恢复顺序 + }) end end + -- 排序逻辑:置顶的排在前面(排除“全部”),非置顶的保持原始相对顺序 + table.sort(tempPlayList, function(a, b) + local aPinned = self.pinnedPlays[a.id] + local bPinned = self.pinnedPlays[b.id] + + -- 如果 a 置顶且 b 未置顶,a 排前面 + if aPinned and not bPinned then + return true + end + -- 如果 b 置顶且 a 未置顶,b 排前面 + if not aPinned and bPinned then + return false + end + -- 如果状态相同(都置顶或都未置顶),按原始索引排序(保持稳定) + return a.originalIndex < b.originalIndex + end) + + -- 提取排序后的 ID 列表,追加到“全部”之后 + for i = 1, #tempPlayList do + table.insert(self.playIdList, tempPlayList[i].id) + end + local lst_layer = self.lst_layer - lst_layer.numItems = count + 1 + lst_layer.numItems = #self.playIdList + + -- 处理选中状态 + if lst_layer.numItems > 0 then + -- 如果当前选中的玩法还在列表中,保持选中;否则选中第一个(通常是“全部”) + local currentSelectedId = self:GetSelectedPlayID() + local foundIndex = -1 + for i = 1, #self.playIdList do + if self.playIdList[i] == currentSelectedId then + foundIndex = i - 1 -- FairyGUI index from 0 + break + end + end + + if foundIndex ~= -1 then + lst_layer.selectedIndex = foundIndex + else + lst_layer.selectedIndex = 0 -- 默认选中“全部” + end + else + lst_layer.selectedIndex = -1 + end +end + +-- 切换置顶状态 +function M:_togglePinPlay(playId) + if not playId or playId == 0 then return end -- 防止对“全部”进行置顶操作 + + -- 互斥置顶逻辑 + local isCurrentlyPinned = self.pinnedPlays[playId] + + if isCurrentlyPinned then + self.pinnedPlays[playId] = false + else + -- 取消其他所有置顶 + for pid, _ in pairs(self.pinnedPlays) do + self.pinnedPlays[pid] = false + end + self.pinnedPlays[playId] = true + end + + -- 刷新列表 + __analysePlayListData(self) + __fillRoomData(self) + self:__loadPlayData() end local function __analyseGameListData(self) @@ -896,7 +1007,7 @@ local function __analyseGameListData(self) if config.isvip and config.isvip == 1 then isvip = 1 end - end + end p_data.isvip = isvip if isvip == self._showVipRooms then @@ -906,10 +1017,10 @@ local function __analyseGameListData(self) existed = true end end - + if existed == false then self.gameIdList[#self.gameIdList + 1] = p_data.gameId - end + end end end @@ -931,14 +1042,18 @@ end function M:GetSelectedPlayID() local lst_layer = self.lst_layer - if lst_layer.selectedIndex == 0 or lst_layer.selectedIndex == -1 then + -- 如果没有选中项或索引无效,返回 0 + if lst_layer.selectedIndex == -1 then return 0 + end + + -- selectedIndex 从 0 开始,playIdList 从 1 开始,所以需要 +1 + local index = lst_layer.selectedIndex + 1 + + if index <= #self.playIdList then + return self.playIdList[index] else - if lst_layer.selectedIndex <= #self.playIdList then - return self.playIdList[lst_layer.selectedIndex] - else - return 0 - end + return 0 end end @@ -949,11 +1064,11 @@ function M:InitView(url) -- local btndel = self._view:GetChild("btn_del") -- local texroomid = self._view:GetChild('tex_roomid') - - - + + + -- btndel.onClick:Set( - + -- function() -- local delroomid -- delroomid = (texroomid.text) or 0 @@ -970,7 +1085,7 @@ function M:InitView(url) -- ) -- _curren_msg.onOk:Add( -- function() - + -- ViewUtil.ShowModalWait(self._root_view) -- local fgCtr = ControllerManager.GetController(NewGroupController) -- fgCtr:FG_RemoveRoom( @@ -997,10 +1112,9 @@ function M:InitView(url) - self._view:GetChild('tex_id').text = "ID:"..self.curGroup.id + self._view:GetChild('tex_id').text = "ID:" .. self.curGroup.id self._view:GetChild('tex_name1').text = self.curGroup.name - -- self._view:GetChild('tex_p_name').text = ViewUtil.stringEllipsis(DataManager.SelfUser.nick_name) @@ -1030,64 +1144,79 @@ function M:InitView(url) self.lst_game = self._view:GetChild('game_list') if self.lst_game then - if self.lst_game then - self.lst_game:SetVirtual() - self.lst_game.itemRenderer = function(index, item) - __fillGameItem(self, index, item) - end + if self.lst_game then + self.lst_game:SetVirtual() + self.lst_game.itemRenderer = function(index, item) + __fillGameItem(self, index, item) + end - -- local btn_remit = self._view:GetChild('btn_remit') - -- btn_remit.visible = false + -- local btn_remit = self._view:GetChild('btn_remit') + -- btn_remit.visible = false - -- 游戏类型列表点击事件:当用户点击某个游戏类型时,刷新玩法和房间列表 -self.lst_game.onClickItem:Add( - function(pas) - -- 防止重复点击同一个游戏项 - if self.currentSelectItem == pas.data then - return + -- -- 游戏类型列表点击事件:当用户点击某个游戏类型时,刷新玩法和房间列表 + -- self.lst_game.onClickItem:Add( + -- function(pas) + -- -- 防止重复点击同一个游戏项 + -- if self.currentSelectItem == pas.data then + -- return + -- end + + -- -- 记录当前选中的游戏项图标名称 + -- local name = pas.data.icon + -- self.currentSelectItem = pas.data + -- self.currentGameItemName = name + + -- -- 重置玩法列表选中索引为"全部"(索引0) + -- self.lst_layer.selectedIndex = 0 + + -- -- 刷新体力值显示 + -- self:__refreshPay() + + -- -- 重新分析游戏列表数据(去重后的游戏ID列表) + -- __analyseGameListData(self) + + -- -- 重新分析玩法列表数据(根据选中的游戏类型过滤玩法) + -- __analysePlayListData(self) + + -- -- 重新填充房间列表数据(根据新的筛选条件显示房间) + -- __fillRoomData(self) + -- end + -- ) end - - -- 记录当前选中的游戏项图标名称 - local name = pas.data.icon - self.currentSelectItem = pas.data - self.currentGameItemName = name - - -- 重置玩法列表选中索引为"全部"(索引0) - self.lst_layer.selectedIndex = 0 - - -- 刷新体力值显示 - self:__refreshPay() - - -- 重新分析游戏列表数据(去重后的游戏ID列表) - __analyseGameListData(self) - - -- 重新分析玩法列表数据(根据选中的游戏类型过滤玩法) - __analysePlayListData(self) - - -- 重新填充房间列表数据(根据新的筛选条件显示房间) - __fillRoomData(self) end -) - end + -- 初始化分类控制器 fennlieM + self.ctr_fennlieM = self._view:GetController('fennlieM') + if self.ctr_fennlieM then + -- 默认选中“全部” (index 0) + self.ctr_fennlieM.selectedIndex = 0 + + -- 监听控制器变化,当用户切换分类时刷新玩法列表 + self.ctr_fennlieM.onChanged:Add(function() + -- 重新分析玩法列表数据(根据新的分类筛选) + __analysePlayListData(self) + -- 刷新房间列表(因为玩法变了,房间也要跟着变) + __fillRoomData(self) + -- 刷新体力值显示等UI状态 + self:__loadPlayData() + end) end - - -- self.line1 = self._view:GetChild('line1') + -- self.line1 = self._view:GetChild('line1') --self.line1.visible = false self.lst_layer = self._view:GetChild('lst_layer') self.lst_layer:SetVirtual() self.lst_layer.itemRenderer = function(index, item) __fillPlayItem(self, index, item) --if index>0 then - -- __fillPlayItem(self, index, item) + -- __fillPlayItem(self, index, item) --else - -- item.width = 0 - -- item.height = 0 - -- item.visible = false - -- end + -- item.width = 0 + -- item.height = 0 + -- item.visible = false + -- end end - + self.lst_layer.onClickItem:Add( function() @@ -1098,10 +1227,10 @@ self.lst_game.onClickItem:Add( local btn_quanbu = self._view:GetChild('btn_quanbu') btn_quanbu.onClick:Set( - function () - self.lst_layer.selectedIndex=0 + function() + self.lst_layer.selectedIndex = 0 self:__loadPlayData() - end + end ) @@ -1132,12 +1261,12 @@ self.lst_game.onClickItem:Add( btn_start.onClick:Set( function() local pid = self.fg_info[tostring(self.curGroup.id)] - + if pid == 0 then ViewUtil.ErrorTip(nil, '没有选择玩法') return end - self:__startGame("",pid, false) + self:__startGame("", pid, false) end ) @@ -1145,7 +1274,6 @@ self.lst_game.onClickItem:Add( local btn_start2 = self._view:GetChild('btn_start2') btn_start2.onClick:Set( function() - local currentPlayID = self:GetSelectedPlayID() if currentPlayID == 0 then if self.lst_layer.selectedIndex == 0 and self.lst_game.selectedIndex > 0 then @@ -1166,7 +1294,7 @@ self.lst_game.onClickItem:Add( end end - self:__startGame("",currentPlayID, false) + self:__startGame("", currentPlayID, false) end ) self.tex_SelectRoom = self._view:GetChild('tex_SelectRoom') @@ -1175,23 +1303,23 @@ self.lst_game.onClickItem:Add( local tex_Selec_yd = self._view:GetController('tex_Selec_yd') tex_Selec_yd.selectedIndex = 1 btn_choose.onClick:Set( - function () + function() -- self.lstgameVisible = not self.lstgameVisible - -- if (self.lstgameVisible) then + -- if (self.lstgameVisible) then -- self.lst_game:TweenMove(Vector2.New(3,146), 0.3) -- else -- self.lst_game:TweenMove(Vector2.New(3,1232), 0.3) -- end -- self.lstgameVisible = not self.lstgameVisible - + -- -- 获取 btn_choose 的当前 Y 坐标 -- local targetY = btn_choose.y - - -- local lst_game_height = self.tex_SelectRoom.height + + -- local lst_game_height = self.tex_SelectRoom.height -- local offset = 5 -- 间距 - -- if (self.lstgameVisible) then + -- if (self.lstgameVisible) then -- -- 显示:移动到 btn_choose 上方 -- self.tex_SelectRoom:TweenMove(Vector2.New(btn_choose.x, targetY - lst_game_height - offset), 0.3) -- else @@ -1199,45 +1327,42 @@ self.lst_game.onClickItem:Add( -- self.tex_SelectRoom:TweenMove(Vector2.New(btn_choose.x, targetY + lst_game_height + 100), 0.3) -- end if tex_Selec_yd.selectedIndex == 1 then - tex_Selec_yd.selectedIndex = 0 + tex_Selec_yd.selectedIndex = 0 else tex_Selec_yd.selectedIndex = 1 end - - - end - -- function() - -- local sgv = - -- GroupSetDefaultGameView.new( - -- self.curGroup.id, - -- self._root_view, - -- function(num) - -- if num == 0 then - -- return - -- end - -- local pid = 0 - -- pid = self.curGroup.playList[num].id - -- btn_choose:GetChild('tex_gamename').text = __getLayerName(self, pid) - -- btn_choose:GetController('null').selectedIndex = 0 - -- local key = tostring(self.curGroup.id) - -- self.fg_info[key] = pid - -- local filename = 'fginfo_' .. DataManager.SelfUser.account_id - -- Utils.SaveLocalFile(filename, json.encode(self.fg_info)) - -- end - -- ) - -- local tem = self.fg_info[tostring(self.curGroup.id)] - -- local play_index = self.curGroup:getPlayIndex(tem) - -- if play_index == -1 then - -- play_index = 1 - -- end - - -- local setCallBackFunc=function() - -- __analysePlayListData(self) - -- end - -- sgv:FillData(self.curGroup.playList, play_index,setCallBackFunc) - -- sgv:Show() - -- end + -- function() + -- local sgv = + -- GroupSetDefaultGameView.new( + -- self.curGroup.id, + -- self._root_view, + -- function(num) + -- if num == 0 then + -- return + -- end + -- local pid = 0 + -- pid = self.curGroup.playList[num].id + -- btn_choose:GetChild('tex_gamename').text = __getLayerName(self, pid) + -- btn_choose:GetController('null').selectedIndex = 0 + -- local key = tostring(self.curGroup.id) + -- self.fg_info[key] = pid + -- local filename = 'fginfo_' .. DataManager.SelfUser.account_id + -- Utils.SaveLocalFile(filename, json.encode(self.fg_info)) + -- end + -- ) + -- local tem = self.fg_info[tostring(self.curGroup.id)] + -- local play_index = self.curGroup:getPlayIndex(tem) + -- if play_index == -1 then + -- play_index = 1 + -- end + + -- local setCallBackFunc=function() + -- __analysePlayListData(self) + -- end + -- sgv:FillData(self.curGroup.playList, play_index,setCallBackFunc) + -- sgv:Show() + -- end ) local btn_close = self._view:GetChild('btn_close') @@ -1255,39 +1380,39 @@ self.lst_game.onClickItem:Add( -- 如果嵌入了GroupMainView,则刷新它 if self._groupMainView_to_embed then local groupMainView = self._groupMainView_to_embed - + -- 检查GroupMainView是否有效 if not groupMainView._view or groupMainView._view.isDisposed then --printlog("警告:GroupMainView已销毁,无法刷新") return end - + ViewUtil.ShowModalWait(self._root_view_for_embed, "刷新中...") local fgCtr = ControllerManager.GetController(NewGroupController) fgCtr:FG_GroupList(function(res) ViewUtil.CloseModalWait() - + -- 再次检查视图有效性 if self._is_destroy then return end - + if not groupMainView._view or groupMainView._view.isDisposed then --printlog("警告:GroupMainView在数据返回后已销毁") return end - + if res.ReturnCode == 0 then --printlog("刷新牌友圈列表成功,开始更新UI") -- 延迟50ms再刷新,确保FairyGUI内部状态稳定 coroutine.start(function() coroutine.wait(0.05) - + -- 最后一次检查 if not groupMainView._view or groupMainView._view.isDisposed then return end - + -- 调用GroupMainView的FillData方法刷新列表 if groupMainView.FillData then pcall(function() @@ -1319,7 +1444,7 @@ self.lst_game.onClickItem:Add( -- end -- ) -- return - -- end + -- end -- self._view:GetController('pipei').selectedIndex = 0 -- end -- ) @@ -1345,20 +1470,20 @@ self.lst_game.onClickItem:Add( -- ) self.tex_fag = self._view:GetChild('tex_fag') - -- self.tex_diamo = self._view:GetChild('player_diamond') + self.tex_diamo = self._view:GetChild('player_diamond') -- self:__loadLastData() self:__loadGroupData() self:__refreshManager() UpdateBeat:Add(self.__onUpdate, self) - + -- 如果传入了GroupMainView,则将其嵌入到详情页中 if self._groupMainView_to_embed and self._root_view_for_embed then self:_embedGroupMainView() end - - self._view.visible=false + + self._view.visible = false end function M:Reconnect() @@ -1370,30 +1495,30 @@ function M:SwitchToGroup(newGroup) if not newGroup or newGroup.id == self.curGroup.id then return end - + -- 更新当前圈子 self.curGroup = newGroup newGroup.layer = 0 DataManager.SelfUser.cur_group = self - + -- 重新加载圈子数据 self:__loadGroupData() self:__refreshManager() - + -- 刷新UI显示 self._view:GetChild('tex_id').text = "ID:" .. self.curGroup.id self._view:GetChild('tex_name1').text = self.curGroup.name - + -- 重置玩法和房间列表 self.gameIdList = {} self.playIdList = {} self.roomItems = {} - + -- 重新分析数据 __analyseGameListData(self) __analysePlayListData(self) __fillRoomData(self) - + -- 刷新嵌入的GroupMainView列表(如果存在) if self._groupMainView_to_embed and self._groupMainView_to_embed.FillData then pcall(function() @@ -1406,18 +1531,18 @@ end function M:_embedGroupMainView() local root_view = self._root_view_for_embed local groupMainView = self._groupMainView_to_embed - + -- 设置GroupMainView的父节点为详情页的根节点 groupMainView:SetParent(root_view) - + -- 设置GroupMainView的锚点和位置 groupMainView:SetAnchor(0, 0, 1, 1) groupMainView:SetPos(0, 0) groupMainView:SetSize(root_view:GetSize()) - + -- 设置GroupMainView的可见性 groupMainView.visible = true - + -- 传递必要的数据或回调给GroupMainView groupMainView:FillData() end @@ -1441,7 +1566,7 @@ function M:__loadLastData() table.insert(self.gameIdList, t.gameId) end table.insert(self.playIdList, t.id) - local room = {maxPlayers = t.maxPlayers, status = 0, default = true, pid = t.id, color = t.deskId} + local room = { maxPlayers = t.maxPlayers, status = 0, default = true, pid = t.id, color = t.deskId } table.insert(self.curRooms, room) self.playNames[t.id] = t.name end @@ -1462,13 +1587,13 @@ function M:__onUpdate() if self._pipeiTime and self._pipeiTime > 0 then local deltaTime = Time.deltaTime self._pipeiTime = self._pipeiTime - deltaTime - self._pipeiTime = math.max( self._pipeiTime,0 ) + self._pipeiTime = math.max(self._pipeiTime, 0) if self._pipeiTime == 0 then - self._view:GetChild('node_matching'):GetChild('text_time').text = "当前排位时间较长,请耐心等待..." - self._view:GetChild('node_matching'):GetController('quxiao').selectedIndex = 1 + self._view:GetChild('node_matching'):GetChild('text_time').text = "当前排位时间较长,请耐心等待..." + self._view:GetChild('node_matching'):GetController('quxiao').selectedIndex = 1 else local time = math.floor(self._pipeiTime) - self._view:GetChild('node_matching'):GetChild('text_time').text = "玩家排位中,".. time .."秒后可退出..." + self._view:GetChild('node_matching'):GetChild('text_time').text = "玩家排位中," .. time .. "秒后可退出..." end end if self.__join_room then @@ -1536,7 +1661,7 @@ function M:__joinRoom(room_id) RestartGame() return end - + if response.ReturnCode == -2 then self:__joinRoom(room_id) return @@ -1558,7 +1683,7 @@ function M:__joinRoom(room_id) ) end ) - return + return end end roomCtr:PublicJoinRoom( @@ -1566,7 +1691,7 @@ function M:__joinRoom(room_id) room_id, false, function(response) - pt(response) + pt(response) if (response.ReturnCode == -1) then ViewUtil.CloseModalWait('join_room') RestartGame() @@ -1594,7 +1719,7 @@ function M:__joinRoom(room_id) ) end -function M:__joinRoom_match(roomid,pid, is_null, isHidden, callback) +function M:__joinRoom_match(roomid, pid, is_null, isHidden, callback) if isHidden == nil then isHidden = 0 local play = self.curGroup:getPlay(pid) @@ -1606,8 +1731,8 @@ function M:__joinRoom_match(roomid,pid, is_null, isHidden, callback) if config.isHidden and config.isHidden == 1 then isHidden = 1 end - end - play.isHidden = isHidden + end + play.isHidden = isHidden end end if isHidden == 1 then @@ -1616,7 +1741,7 @@ function M:__joinRoom_match(roomid,pid, is_null, isHidden, callback) DataManager.SelfUser.location = Location.new() end if DataManager.SelfUser.location:Location2String() == "" then - -- if DataManager.SelfUser.location:Location2String() == "" then + -- if DataManager.SelfUser.location:Location2String() == "" then ViewUtil.ErrorTip(nil, "没有打开GPS定位,不能参与该游戏") get_gps() return @@ -1641,7 +1766,7 @@ function M:__joinRoom_match(roomid,pid, is_null, isHidden, callback) RestartGame() return end - + if response.ReturnCode ~= 0 then self._view:GetController('pipei').selectedIndex = 0 callback(response.ReturnCode) @@ -1664,9 +1789,9 @@ function M:__joinRoom_match(roomid,pid, is_null, isHidden, callback) end, self.curGroup.id, pid - ) + ) end) - + return end @@ -1742,7 +1867,7 @@ end function M:_evtUpdatePlayerInfo() self.tex_fag.text = '' .. d2ad(self.curGroup.hp) - -- self.tex_diamo.text = self.curGroup.diamo + self.tex_diamo.text = self.curGroup.diamo -- self._view:GetController("manager").selectedIndex = (self.curGroup.lev < 3 or self.curGroup.partnerLev > 0) and 1 or 0 end @@ -1756,29 +1881,30 @@ function M:_evtUpdateMsg() self:_setHongDian(true) end end + function M:_setHongDian(isShow) --红点提示 local member_tips = self._view:GetChild('member_tips') member_tips.visible = isShow end + function M:_evtInvited(...) - local arg = {...} + local arg = { ... } local data = arg[1] local imv = FGInvitedMsgView.new( - self._root_view, - self.curGroup.id, - function(roomid) - self:__joinRoom(roomid) - end - ) + self._root_view, + self.curGroup.id, + function(roomid) + self:__joinRoom(roomid) + end + ) imv:FillData(data) imv:Show() end -- 更新牌友圈事件 function M:_evtUpdateGroup(...) - -- local btn_remit = self._view:GetChild('btn_remit') -- local option = self.curGroup.option or 0 @@ -1817,24 +1943,23 @@ function M:__refreshManager() end ) local btn_partner = self._view:GetChild('btn_partner') - btn_partner.onClick:Set( + btn_partner.onClick:Set( function() - --print("成员..........................................") if not self.mng_view3 then self.mng_view3 = GroupManagerView.new(self._root_view, self.curGroup.id, 5) - self.mng_view3:SetCurrentGroupInfoViewIns(function () - self:OnclickMember() - end) + self.mng_view3:SetCurrentGroupInfoViewIns(function() + self:OnclickMember() + end) end self.mng_view3:Show() -- self:SetRoomListVisible(false) end ) - + local btn_play = self._view:GetChild('btn_play') btn_play.onClick:Set(function() - local gl_view =GroupMngGameListView.new(self.curGroup.id) + local gl_view = GroupMngGameListView.new(self.curGroup.id) gl_view:Show() -- self:SetRoomListVisible(false) end) @@ -1851,9 +1976,8 @@ function M:__refreshManager() ) end - function M:OnclickMember() - if not self.mng_view3 then + if not self.mng_view3 then self.mng_view3 = GroupManagerView.new(self._root_view, self.curGroup.id, 5) end self.mng_view3:Show() @@ -1878,18 +2002,18 @@ function M:__ShowNotice() end self._tw_notice = DSTween.To( - 0, - 1, - dur_time, - function(value) - tex_notice.x = start_x - speed_x * value * dur_time - end - ):OnComplete( - function() - self._tw_notice = nil - self:__ShowNotice() - end - ) + 0, + 1, + dur_time, + function(value) + tex_notice.x = start_x - speed_x * value * dur_time + end + ):OnComplete( + function() + self._tw_notice = nil + self:__ShowNotice() + end + ) end -- 显示玩法信息 @@ -1909,7 +2033,7 @@ function M:__loadGroupData() curGroup.update_room = false curGroup.update_info = false curGroup.update_joins = false - ViewUtil.ShowModalWait(self._root_view,"正在进入牌友圈,请稍等...") + ViewUtil.ShowModalWait(self._root_view, "正在进入牌友圈,请稍等...") local fgCtr = ControllerManager.GetController(NewGroupController) fgCtr:FG_EnterGroup( curGroup.id, @@ -1917,13 +2041,13 @@ function M:__loadGroupData() -- if self._is_destroy then -- return -- end - ViewUtil.CloseModalWait() + ViewUtil.CloseModalWait() if res.ReturnCode ~= 0 then - --self._view.visible=false - --ViewUtil.ErrorTip(res.ReturnCode, "获取圈子数据失败") + --self._view.visible=false + --ViewUtil.ErrorTip(res.ReturnCode, "获取圈子数据失败") else - self._view.visible=true - self:Show() + self._view.visible = true + self:Show() self:__saveLastData() local mgr_ctr = ControllerManager.GetController(GroupMgrController) mgr_ctr:AddEventListener(GroupMgrEvent.AddPlay, handler(self, self._evtAddPlay)) @@ -1945,23 +2069,23 @@ function M:__loadGroupData() local ctr_msg = self._view:GetController('msg') ctr_msg.selectedIndex = 1 end - + local btn_vip = self._view:GetChild("btn_vip") if self.curGroup.isvip == 1 then - local vip = self.fg_info[tostring(self.curGroup.id).."vip"] or 0 + local vip = self.fg_info[tostring(self.curGroup.id) .. "vip"] or 0 self._showVipRooms = vip - btn_vip:GetController("vip").selectedIndex = math.abs( self._showVipRooms - 1) - btn_vip.onClick:Set(function () + btn_vip:GetController("vip").selectedIndex = math.abs(self._showVipRooms - 1) + btn_vip.onClick:Set(function() btn_vip:GetController("vip").selectedIndex = self._showVipRooms - self._showVipRooms = math.abs( self._showVipRooms - 1 ) + self._showVipRooms = math.abs(self._showVipRooms - 1) self:_evtUpdatePlay() local key = tostring(self.curGroup.id) .. "vip" self.fg_info[key] = self._showVipRooms local filename = 'fginfo_' .. DataManager.SelfUser.account_id - Utils.SaveLocalFile(filename, json.encode(self.fg_info)) - end) + Utils.SaveLocalFile(filename, json.encode(self.fg_info)) + end) end - + -- 玩法列表初始化 __analyseGameListData(self) __analysePlayListData(self) @@ -1989,14 +2113,14 @@ function M:__loadGroupData() end ) local btn_invite = self._view:GetChild('btn_invite') - btn_invite.displayObject.gameObject:SetActive(false) + btn_invite.displayObject.gameObject:SetActive(false) --[[btn_invite.onClick:Set(function() if not self.mng_view3 then self.mng_view3 = GroupManagerView.new(self._root_view, self.curGroup.id, 3) end self.mng_view3:Show(1) end)--]] - + -- local btn_rank = self._view:GetChild("btn_rank") -- btn_rank.onClick:Set(function() -- local rv = GroupRank.new(self._root_view, self.curGroup.id) @@ -2035,22 +2159,23 @@ function M:__loadGroupData() btn_mail.selected = false end ) - gmv:Show() + gmv:Show() end ) local btn_bxx = self._view:GetChild('btn_bxx') btn_bxx.onClick:Set( function() - local ctrNum=1 - -- if self.curGroup.lev==3 and self.curGroup.partnerLev>0 or self.curGroup.lev==1 or self.curGroup.lev==2 then - -- ctrNum=2 - -- end - if self.curGroup.lev==1 then - ctrNum=2 - end - ctrNum=2 - local gmv = GroupMngFagPackView.new(self.curGroup.id, self._root_view,ctrNum,DataManager.SelfUser.account_id) + local ctrNum = 1 + -- if self.curGroup.lev==3 and self.curGroup.partnerLev>0 or self.curGroup.lev==1 or self.curGroup.lev==2 then + -- ctrNum=2 + -- end + if self.curGroup.lev == 1 then + ctrNum = 2 + end + ctrNum = 2 + local gmv = GroupMngFagPackView.new(self.curGroup.id, self._root_view, ctrNum, + DataManager.SelfUser.account_id) gmv:SetCallback( function() btn_bxx.selected = false @@ -2065,7 +2190,7 @@ function M:__loadGroupData() local robot_btn = self._view:GetChild('btn_rebot') robot_btn.onClick:Set( function() - local gmv = GroupPartnerRobotGames.new(self.curGroup.id,DataManager.SelfUser.account_id) + local gmv = GroupPartnerRobotGames.new(self.curGroup.id, DataManager.SelfUser.account_id) gmv:Show() end ) @@ -2075,7 +2200,7 @@ function M:__loadGroupData() end -- 匹配游戏 -function M:__startGame(roomid,pid, is_null,isHidden, callback) +function M:__startGame(roomid, pid, is_null, isHidden, callback) ViewUtil.ShowModalWait(self._root_view, '正在加入游戏...', 'join_room') local _gameCtrl = ControllerManager.GetController(GameController) local _currentCtrl = ControllerManager.GetCurrenController() @@ -2089,7 +2214,7 @@ function M:__startGame(roomid,pid, is_null,isHidden, callback) isHidden, function(code) if code == -2 then - self:__startGame(roomid,pid, is_null, isHidden, callback) + self:__startGame(roomid, pid, is_null, isHidden, callback) elseif code ~= 0 then ViewUtil.ErrorMsg(self._root_view, code, '进入房间失败') ViewUtil.CloseModalWait('join_room') @@ -2125,7 +2250,7 @@ end -- 显示各玩法体力值信息 function M:__refreshPay() self.tex_fag.text = '' .. d2ad(self.curGroup.hp or 0) - -- self.tex_diamo.text = self.curGroup.diamo + self.tex_diamo.text = self.curGroup.diamo local ctr_all = self._view:GetController('all') @@ -2153,11 +2278,11 @@ function M:__share() local str = string.format('【%s】 邀请您加入!', tem.name) local url = string.format( - '%s?type=t1&playerId=%s&groupId=%s', - GetGameInfo('share_group_link'), - DataManager.SelfUser.account_id, - tem.id - ) + '%s?type=t1&playerId=%s&groupId=%s', + GetGameInfo('share_group_link'), + DataManager.SelfUser.account_id, + tem.id + ) local json_data = {} json_data['title'] = string.format('大联盟号【%s】', tem.id) local mediaObject = {} @@ -2178,12 +2303,13 @@ function M:showPipei(play) end self._pipeiTime = 20 end + function M:hidePipei() - if self._view:GetController('pipei') then - self._view:GetController('pipei').selectedIndex = 0 - end - + if self._view:GetController('pipei') then + self._view:GetController('pipei').selectedIndex = 0 + end end + function M:SetCallBack(callback) self._callback = nil self._callback = callback @@ -2198,22 +2324,22 @@ function M:_embedGroupMainView() if not self._groupMainView_to_embed or not self._root_view_for_embed then return end - + local groupMainView = self._groupMainView_to_embed - + -- 设置父视图引用,用于切换圈子 groupMainView._parentInfoView = self - + -- 记录原始父容器,以便关闭时恢复 if groupMainView._view and groupMainView._view.parent then groupMainView._originalParent = groupMainView._view.parent end - + -- 先隐藏视图 if groupMainView._view then groupMainView._view.visible = false end - + -- 将列表页添加到详情页的lnfo_group组件中 local container = self._view:GetChild('lnfo_group') if container then @@ -2223,7 +2349,7 @@ function M:_embedGroupMainView() end -- 添加到lnfo_group容器 container:AddChild(groupMainView._view) - + -- 延迟显示,确保FairyGUI内部状态稳定 coroutine.start(function() coroutine.wait(0.05) @@ -2263,7 +2389,7 @@ function M:Destroy() end) end end - + BaseView.Destroy(self) UpdateBeat:Remove(self.__onUpdate, self) ImageLoad.Clear(self.class) @@ -2309,4 +2435,3 @@ function M:Destroy() end return M - diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua index 3d88a65e..083dfcde 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua @@ -27,7 +27,9 @@ end -- 获取界面配置 local function getPageConfig(id) --pt(MngPageConfig.PageList) + for i = 1, #MngPageConfig.PageList do + local tem = MngPageConfig.PageList[i] if tem.id == id then return tem @@ -55,7 +57,8 @@ function M:init(url, btn_type) end self.page_config = MngPageConfig.Config[btn_type][lev] - + printlog("------------page_config-------------:" ) +pt(self.page_config) -- 初始化标题列表 for i = 1, #self.page_config do -- print("page_config:"..self.page_config[i]) @@ -131,47 +134,54 @@ function M:init(url, btn_type) -- 切换界面 self.ctr_index = self._view:GetController("index") + -- 监听左侧导航列表索引变化,实现子页面的切换 self.ctr_index.onChanged:Set(function(pas) local anchor = self._view:GetChild("anchor") + + -- 1. 清理容器:移除当前显示的所有子视图 + -- 注意:这里只是从父节点移除,并没有销毁对象,以便后续复用 anchor:RemoveChildren() - + -- 2. 获取目标页面配置 local index = self.ctr_index.selectedIndex + -- page_config 存储的是页面ID列表,需要根据索引获取对应的配置详情 local page_info = getPageConfig(self.page_config[index + 1]) + + -- 3. 视图懒加载与缓存机制 if not self._view_map[index + 1] then + -- 【情况A:首次访问该页面】需要创建新的视图实例 + + -- 实例化对应的子视图类 (例如: GroupMngMemberListView1.new(...)) local tem = page_info.view.new(self.group_id, self._root_view) - -- anchor:AddRelation(self._root_view, RelationType.Size,true) - --tem._view:Center(true) - - --print("222222222222222",anchor._view) + -- 将新创建的视图添加到锚点容器中显示 anchor:AddChild(tem._view) - -- tem._view.parent = anchor + -- 【UI适配】强制设置子视图尺寸与容器一致 local offset = get_offset(self._full_offset) tem._view.width = anchor.width tem._view.height = anchor.height - tem._view.x = 0 --offset - --tem._view:AddRelation(self._root_view, RelationType.Size) - -- tem._view:MakeFullScreen() + tem._view.x = 0 --offset (通常设为0以贴合左侧或居中,具体视UI布局而定) + -- 记录页面唯一ID,用于后续查找 tem.id = page_info.id + + -- 【缓存】将创建好的视图实例存入映射表,避免重复创建 self._view_map[index + 1] = tem - -- - -- anchor:SetBoundsChangedFlag() - -- anchor:EnsureBoundsCorrect() - -- tem._view:RemoveRelation(anchor, RelationType.Size) - --tem._view:AddRelation(anchor, RelationType.Size) else - --self._view_map[index + 1]._view:AddRelation(anchor, RelationType.Size) + -- 【情况B:再次访问该页面】直接从缓存中读取并重新挂载 + + -- 从映射表中取出之前创建过的视图实例,重新添加回容器 anchor:AddChild(self._view_map[index + 1]._view) end - --self._view:AddRelation(anchor, RelationType.Size) - -- 如果refresh为true,重新加载界面时执行初始化数据方法initData + -- 4. 数据刷新 + -- 如果配置中标记了 refresh=true,则每次切换到此页面时都重新加载数据 if page_info.refresh then self._view_map[index + 1]:initData() end + + -- 5. 更新顶部标题 self.titleTxt.text = page_info.title end) end @@ -219,7 +229,6 @@ end -- quick_access_id 是快速访问标志,打开对应id的页面 function M:Show(quick_access_id) local index = self.ctr_index.selectedIndex - printlog("index+1index+1index+1index+1 ", index + 1) if not quick_access_id then local page_info = getPageConfig(self.page_config[index + 1]) if page_info.refresh then self._view_map[index + 1]:initData() end diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua index 48047094..ef6f0b26 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua @@ -35,16 +35,20 @@ function M:init(url) BaseWindow.init(self,url) self.hpData = {} - -- 【新增】初始化游戏类型筛选控制器 fennlieM - self.ctr_fennlieM = self._view:GetController('fennlieM') - if self.ctr_fennlieM then + -- 【新增】初始化游戏类型筛选控制器 View_GroupGameSetting_fennlieM + self.View_GroupGameSetting_ctr_fennlieM = self._view:GetController('View_GroupGameSetting_fennlieM') + printlog("------ssss------") + + if self.View_GroupGameSetting_ctr_fennlieM then -- 默认选中"麻将" (index 0),对应 gameType=1 - self.ctr_fennlieM.selectedIndex = 0 - + self.View_GroupGameSetting_ctr_fennlieM.selectedIndex = 0 + -- 监听控制器变化,当用户切换分类时刷新游戏列表 - self.ctr_fennlieM.onChanged:Add(function() + self.View_GroupGameSetting_ctr_fennlieM.onChanged:Add(function() + -- 重新填充游戏列表数据(根据新的分类筛选) self:FillGameData() + printlog("------ssss------",self.View_GroupGameSetting_ctr_fennlieM.selectedIndex) end) end @@ -80,9 +84,9 @@ function M:FillGameData() -- 【新增】获取当前选中的游戏类型 (0=麻将, 1=扑克, 2=字牌) local selectType = 1 -- 默认麻将(对应 gameType=1) - if self.ctr_fennlieM then + if self.View_GroupGameSetting_ctr_fennlieM then -- 控制器索引 0,1,2 对应 gameType 1,2,3 - selectType = self.ctr_fennlieM.selectedIndex + 1 + selectType = self.View_GroupGameSetting_ctr_fennlieM.selectedIndex + 1 end -- 【修复】由于 GameListView 内部硬编码读取 DataManager.SelfUser.games, -- 我们需要临时替换全局数据源为筛选后的数据 diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua index 1474a2a8..741a94ae 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua @@ -62,7 +62,7 @@ function M:FillView() self._view = UIPackage.CreateObjectFromURL('ui://NewGroup/View_GroupMemberList1') local rtype = self._view:GetChild("n132") - rtype.visible = false + rtype.visible = true rtype.onChanged:Set(function () if tostring(self.online) == rtype.value then @@ -186,6 +186,7 @@ function M:FillView() local ctr_mng = self._view:GetController('mng') local ctr_page = self._view:GetController('page') + self._view:GetController('page').selectedIndex = 0 if group.lev == 1 then ctr_mng.selectedIndex = 1 --ctr_page.selectedIndex = 0 @@ -309,31 +310,44 @@ function M:FillItem(obj, member, refresh) local tex_fag = obj:GetChild('tex_fag') tex_fag.text = d2ad(member.hp) - obj:GetChild('tex_id').text = '' .. member.uid - --obj:GetChild("tex_cost_count").text = d2ad(member.last_hp_cost) - - --if member.online == 1 then - -- obj:GetChild('tex_last_login').text = '在线' - -- else + obj:GetChild('tex_id').text = 'ID:' .. member.uid + + ---obj:GetChild("tex_cost_count").text = d2ad(member.last_hp_cost) + if member.online == 1 then + obj:GetController('tex_last_login_yanshi').selectedIndex = 0 + obj:GetChild('tex_last_login').text = '在线' + else + obj:GetController('tex_last_login_yanshi').selectedIndex = 1 if member.last_time ~= 0 then - -- local now_time = os.date("*t",now) - -- local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) - -- local cha = math.ceil((today - member.last_time) / (24 * 60 *60)) - -- if (cha > 0) then - -- obj:GetChild('tex_last_login').text = cha.."天前" --'最近登录\n' .. os.date('%Y/%m/%d', member.last_time) - -- else - -- obj:GetChild('tex_last_login').text = os.date('%Y/%m/%d', member.last_time) - -- end + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + local cha = math.ceil((today - member.last_time) / (24 * 60 *60)) + if (cha > 0) then + obj:GetChild('tex_last_login').text = cha.."天前登录" --'最近登录\n' .. os.date('%Y/%m/%d', member.last_time) + else + obj:GetChild('tex_last_login').text = os.date('%Y/%m/%d', member.last_time) + end --print("11111aaaaaaaaaaaaaaaaaaaa ",os.date('%Y/%m/%d', member.last_time)) - obj:GetChild('tex_last_login').text = "最近登录:"..os.date('%Y/%m/%d', member.last_time) + --obj:GetChild('tex_last_login').text = "最近登录:"..os.date('%Y/%m/%d', member.last_time) else - obj:GetChild('tex_last_login').text = '加入时间\n' .. os.date('%Y/%m/%d', member.join_time) + --obj:GetChild('tex_last_login').text = '加入时间\n' .. os.date('%Y/%m/%d', member.join_time) end - -- end + end obj:GetChild('tex_zongchangci').text = member.total_round - obj:GetChild('tex_ruhui').text = os.date('%Y/%m/%d %H:%M:%S', member.join_time) + -- 【修改】分离加入时间的日期和时间 + local joinTimeStr = os.date('%Y/%m/%d %H:%M:%S', member.join_time) + local datePart, timePart = joinTimeStr:match("^(%S+)%s+(%S+)$") + + -- 设置日期部分到 tex_ruhui (如果 UI 上这个只显示日期) + obj:GetChild('tex_ruhui').text = datePart or joinTimeStr + + -- 设置时间部分到 tex_ruhui_juti + local tex_ruhui_juti = obj:GetChild('tex_ruhui_juti') + if tex_ruhui_juti then + tex_ruhui_juti.text = timePart or "" + end --上级 obj:GetChild('tex_shangjiName').text=member.parentId_nick or "" @@ -451,7 +465,7 @@ function M:FillItem(obj, member, refresh) ) local btnBxx = obj:GetChild('btn_bxx') - btnBxx.visible = (not (member.lev == 3 and member.partnerLev == 0)) and not (DataManager.SelfUser.account_id == member.uid) + --btnBxx.visible = (not (member.lev == 3 and member.partnerLev == 0)) and not (DataManager.SelfUser.account_id == member.uid) --btnBxx.visible = not (DataManager.SelfUser.account_id == member.uid) obj:GetChild('btn_bxx').onClick:Set( function() @@ -471,7 +485,7 @@ function M:FillItem(obj, member, refresh) ) local superBtn = obj:GetChild('super_btn') - superBtn.visible = group.lev == 1 + --superBtn.visible = group.lev == 1 obj:GetChild("super_btn").onClick:Set( function() ViewUtil.ShowModalWait(nil) @@ -557,7 +571,7 @@ function M:FillJoinList(data) for i = 1, #data do local item = lst_joins:AddItemFromPool() item:GetChild('tex_name').text = ViewUtil.stringEllipsis(data[i].nick) - item:GetChild('tex_id').text = data[i].id + item:GetChild('tex_id').text = 'ID:' ..data[i].id local btn_head = item:GetChild('btn_head') ImageLoad.Load(data[i].portrait, btn_head._iconObject) item:GetChild('btn_yes').onClick:Set( diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView1.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView1.lua index ec6321df..2f4fe8aa 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView1.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView1.lua @@ -251,6 +251,7 @@ function M:FillItem(obj, partner) obj:GetChild("tex_id").text = "("..partner.id..")"--partner.uid obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(partner.nick) + obj:GetChild("btn_head").icon = "ui://Common/Head0" ImageLoad.Load(partner.portrait, obj:GetChild("btn_head")._iconObject, self.class) -- 体力值操作按钮事件 @@ -312,8 +313,23 @@ function M:FillItem(obj, partner) obj:GetChild("tex_member_count").text = ""..partner.round obj:GetChild("tex_fenzu").text = partner.group obj:GetChild("tex_caozuo").text = partner.opnick - obj:GetChild("tex_tuichu").text = os.date('%Y/%m/%d %H:%M', partner.deltime) + --obj:GetChild("tex_tuichu").text = os.date('%Y/%m/%d %H:%M', partner.deltime) + -- 【修改】分离加入时间的日期和时间 + local joinTimeStr = os.date('%Y/%m/%d %H:%M:%S', partner.join_time) + local datePart, timePart = joinTimeStr:match("^(%S+)%s+(%S+)$") + + -- 设置日期部分到 tex_tuichu (如果 UI 上这个只显示日期) + obj:GetChild('tex_tuichu').text = datePart or joinTimeStr + + -- 设置时间部分到 tex_tuichu_shimiao + local tex_tuichu_shimiao = obj:GetChild('tex_tuichu_shimiao') + if tex_tuichu_shimiao then + tex_tuichu_shimiao.text = timePart or "" + end + + + obj:GetChild("tex_kickOutM").text = ViewUtil.stringEllipsis(partner.nick).."被踢出了亲友圈,操作人:"..partner.opnick obj:GetChild("btn_percent").onClick:Set(function() self:ShowPartnerRewards(partner.uid, partner.partnerLev) diff --git a/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info b/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info index 95ed694c..6ac0fea4 100644 --- a/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info +++ b/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info @@ -9,9 +9,6 @@ "n138_csp4": { "hidden": true }, - "n130_naup": { - "locked": true - }, "n51_lwcl": { "hidden": true }, diff --git a/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info b/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info index 65b6dfd4..5077008b 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info +++ b/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info @@ -26,6 +26,9 @@ }, "n186_p0pd": { "hidden": true + }, + "n242_wqg2": { + "hidden": true } }, "fitScreen": "FitSize" diff --git a/wb_new_ui/.objs/metas/m7iejg46/e5q7hu2.info b/wb_new_ui/.objs/metas/m7iejg46/e5q7hu2.info index 85e13e7d..00d0a03f 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/e5q7hu2.info +++ b/wb_new_ui/.objs/metas/m7iejg46/e5q7hu2.info @@ -2,6 +2,9 @@ "objectStatus": { "n15_jjon": { "hidden": true + }, + "n16_isix": { + "hidden": true } } } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info b/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info index 4171dcf4..2434dfa3 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info +++ b/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info @@ -1,9 +1,9 @@ { "objectStatus": { - "n87_csp4": { + "n79_ovii": { "hidden": true }, - "n79_ovii": { + "n65_hsbh": { "hidden": true } }, diff --git a/wb_new_ui/.objs/metas/m7iejg46/z3847i6m.info b/wb_new_ui/.objs/metas/m7iejg46/z3847i6m.info index d72afb5d..3864e298 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/z3847i6m.info +++ b/wb_new_ui/.objs/metas/m7iejg46/z3847i6m.info @@ -6,14 +6,12 @@ "n122_b8zx": { "hidden": true }, - "n132_z384": { - "hidden": true - }, - "n86_t1hq": { + "n127_b8zx": { "hidden": true }, "n33_rpaz": { - "hidden": true + "hidden": true, + "collapsed": true }, "n128_b8zx": { "hidden": true @@ -21,13 +19,14 @@ "n124_b8zx": { "hidden": true }, - "n120_b8zx": { + "n112_csp4": { "hidden": true }, "n35_rpaz": { - "hidden": true + "hidden": true, + "collapsed": true }, - "n127_b8zx": { + "n120_b8zx": { "hidden": true }, "n123_b8zx": { @@ -44,8 +43,10 @@ }, "n121_b8zx": { "hidden": true + }, + "n113_csp4": { + "hidden": true } }, - "adaptiveTest": true, "fitScreen": "FitSize" } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/z3847i6q.info b/wb_new_ui/.objs/metas/m7iejg46/z3847i6q.info index 917ee2dd..f8cdcfd2 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/z3847i6q.info +++ b/wb_new_ui/.objs/metas/m7iejg46/z3847i6q.info @@ -1,15 +1,39 @@ { "objectStatus": { - "n57_ocx0": { + "n60_ovii": { "hidden": true }, - "n67_z384": { + "n47_rpaz": { "hidden": true }, - "n44_rpaz": { - "collapsed": true + "n70_k5m9": { + "hidden": true }, - "n58_ocx0": { + "n65_et16": { + "hidden": true + }, + "n59_ovii": { + "hidden": true + }, + "n69_z384": { + "hidden": true + }, + "n68_z384": { + "hidden": true + }, + "n1_kwi0": { + "hidden": true + }, + "n72_mtk5": { + "hidden": true + }, + "n2_kwi0": { + "hidden": true + }, + "n26_kwi0": { + "hidden": true + }, + "n24_kwi0": { "hidden": true } } diff --git a/wb_new_ui/.objs/metas/m7iejg46/z3847i6r.info b/wb_new_ui/.objs/metas/m7iejg46/z3847i6r.info index 34cb8e56..6e893924 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/z3847i6r.info +++ b/wb_new_ui/.objs/metas/m7iejg46/z3847i6r.info @@ -1,22 +1,17 @@ { "objectStatus": { - "n130_yre9": { - "hidden": true - }, - "n13_gls1": { + "n79_nk4v": { "hidden": true }, "n78_nk4v": { "hidden": true }, - "n73_cioe": { + "n134_b8zx": { "hidden": true }, - "n79_nk4v": { - "hidden": true - }, - "n98_yetw": { + "n20_gls1": { "hidden": true } - } + }, + "adaptiveTest": true } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/z3847i6s.info b/wb_new_ui/.objs/metas/m7iejg46/z3847i6s.info index 3092a99b..42fe47a8 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/z3847i6s.info +++ b/wb_new_ui/.objs/metas/m7iejg46/z3847i6s.info @@ -1,14 +1,23 @@ { "objectStatus": { - "n42_ozaz": { - "hidden": true - }, "n31_oj7k": { "hidden": true, "collapsed": true }, "n49_et16": { "hidden": true + }, + "n35_oj7k": { + "hidden": true + }, + "n56_otck": { + "hidden": true + }, + "n21_oj7k": { + "hidden": true + }, + "n42_ozaz": { + "hidden": true } } } \ No newline at end of file diff --git a/wb_new_ui/.objs/workspace.json b/wb_new_ui/.objs/workspace.json index 88aaea46..164c9233 100644 --- a/wb_new_ui/.objs/workspace.json +++ b/wb_new_ui/.objs/workspace.json @@ -4,16 +4,16 @@ "doc.openedDocs": [ "ui://2d9xdj6zfn7fao", "ui://2zlli80mw9te0", - "ui://m7iejg4610snh5j", - "ui://m7iejg46kwi0hk1", "ui://m7iejg46kwi0hkb", - "ui://2d9xdj6z75efcz", - "ui://2d9xdj6z97mlcin" + "ui://m7iejg4610snh5j", + "ui://m7iejg46hsbhhjn", + "ui://m7iejg46z3847i6m", + "ui://m7iejg46z3847i6r" ], - "test.device": "iPad", + "test.device": "720p Phone", "canvasColor": 10066329, "auxline2": true, - "doc.activeDoc": "ui://2d9xdj6z75efcz", + "doc.activeDoc": "ui://m7iejg46hsbhhjn", "libview.twoColumn": false, "libview.expandedNodes": [ "2d9xdj6z", @@ -37,6 +37,8 @@ "m7iejg46", "/component/Lst_info/", "m7iejg46", + "/component/nav/", + "m7iejg46", "/images/", "m7iejg46", "/images/NGXiangTangMui/", diff --git a/wb_new_ui/assets/Common/buttons/Btn_menu_l.xml b/wb_new_ui/assets/Common/buttons/Btn_menu_l.xml index 3770f89a..3143741c 100644 --- a/wb_new_ui/assets/Common/buttons/Btn_menu_l.xml +++ b/wb_new_ui/assets/Common/buttons/Btn_menu_l.xml @@ -11,5 +11,5 @@ -