diff --git a/lua_probject/base_project/Game/View/LobbyView.lua b/lua_probject/base_project/Game/View/LobbyView.lua index 806def0..6967626 100644 --- a/lua_probject/base_project/Game/View/LobbyView.lua +++ b/lua_probject/base_project/Game/View/LobbyView.lua @@ -6,7 +6,9 @@ local CreateRoomView = import(".Lobby.CreateRoomView") local JoinRoomView = import(".Lobby.JoinRoomView") local LobbySettingView = import(".Lobby.LobbySettingView") local RankView = import(".Lobby.RankView") +local JoinGroupView = import(".NewGroup.JoinGroupView") local GroupMainView = import(".NewGroup.GroupMainView") +local GroupInfoView = import(".NewGroup.GroupInfoView") local NoticeView = import(".Lobby.NoticeView") local HeadView = import(".Lobby.LobbyHeadView") local PhoneBindView = import(".Lobby.PhoneBindView") @@ -162,18 +164,44 @@ function M:InitView(url) local btn_more_group = self._view:GetChild("btn_more_group") btn_more_group.onClick:Set(function() - --self.groupMainView._view.visible = true ViewUtil.ShowModalWait(self._root_view,"请稍等,获取牌友圈中...") - local enterGroupCallBackFunc=function (code) - ViewUtil.CloseModalWait() - if code==0 then - self.groupMainView._view.visible = true + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupList(function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + local groups = DataManager.groups.groupList + if #groups == 0 then + -- 如果没有圈子,显示列表页让用户创建或加入 + self.groupMainView._view.visible = true + self.groupMainView:Show() + else + -- 有圈子,显示第一个圈子的详情页 + local curGroup = groups[1] + -- 读取牌友圈信息 + local filename = 'fginfo_' .. DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(filename) + local fg_info = not json_data and {} or json.decode(json_data) + + -- 创建GroupInfoView,传入根视图和列表页容器 + -- GroupMainView会被嵌入到GroupInfoView的lnfo_group组件中,显示所有圈子列表 + local info = GroupInfoView.new(curGroup, fg_info, self._root_view, self.groupMainView) + info:SetCallBack(function() + -- 关闭回调:恢复列表页到原位置 + if self.groupMainView and self.groupMainView._view and not self.groupMainView._view.isDisposed then + -- 将列表页移回原容器 + if self.groupMainView._originalParent then + self.groupMainView._originalParent:AddChild(self.groupMainView._view) + self.groupMainView._originalParent = nil + end + self.groupMainView._view.visible = false + end + end) + info:Show() + end else ViewUtil.ErrorTip(10000000,"获取牌友圈失败,请检查网络设置!") - printlog("获取圈子数据失败=======>>>>") end - end - self.groupMainView:Show(nil,enterGroupCallBackFunc) + end) end) -- local btn_more_group = self._view:GetChild("btn_more_group") diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua index 9ab68a5..55cb2f3 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua @@ -20,13 +20,15 @@ local M = GroupInfoView local currentSelectPlay=0 -function GroupInfoView.new(curGroup, fg_info) +function GroupInfoView.new(curGroup, fg_info, root_view, groupMainView) 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.roominfo = {} self.gameIdList = {} self.playIdList = {} @@ -111,8 +113,6 @@ end local function RoomWeight1(room) - --printlog("aaaaaaaaawwwwwwwwwwwwwwwwwwwwwwwwwwwww") - --pt(room) local weight = 0 if room.status == 1 then weight = weight + 20 @@ -126,15 +126,12 @@ local function RoomWeight1(room) weight = weight + 1 end room.weight = weight - -- printlog("aaaaaaaaaaaaaaaaaaaccccccccccccccccccccccc ",weight) - --pt(room) return weight end -- 房间排序 local function SortRooms(a, b) - -- printlog("SortRooms====》》》》",currentSelectPlay) if currentSelectPlay==0 then local rwa = RoomWeight(a) local rwb = RoomWeight(b) @@ -171,8 +168,6 @@ local function __fillRoomItem(self, index, item, room) local curGroup = self.curGroup local roomid = room.id local plist = room.plist - -- printlog("-------------------------------ssssssss------------------------------") - -- pt(plist) local state = room.status local str = nil local room_item = self.roomItems[item] @@ -201,7 +196,6 @@ local function __fillRoomItem(self, index, item, room) end - --printlog("wwwwwwwwwww1111111111111111 ",room.round," ",room.times) 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 @@ -386,8 +380,6 @@ local function __fillRoomData(self) -- self.lst_layer.visible = currentGameID > 0 --self.line1.visible = currentGameID > 0 if currentPlayID > 0 then - --printlog("aaaaaaaaaaaaaaaaa11111111111111111111111111111111") - -- 单个玩法 local rooms = self.curGroup:getPlay(currentPlayID).rooms local trooms = {} for i=1,#rooms do @@ -467,7 +459,6 @@ local function __fillRoomData(self) else if currentGameID == 0 then - --printlog("aaaaaaaaaaaaaaaaa222222222222222222222222222") local rooms = curGroup.rooms local trooms = {} for i=1,#rooms do @@ -545,7 +536,6 @@ local function __fillRoomData(self) end end else - --printlog("aaaaaaaaaaaaaaaaa33333333333333333333333333333333") self.curRooms = {} for i = 1, #self.curGroup.playList do @@ -664,7 +654,6 @@ end function M:InitRoomInfoView() local room = self.roominfo.room if not room.default then - --printlog("wwwwwwwwwww22222222222222222 ",room.round," ",room.times) self.roominfo.view:GetChild('tex_round').text = string.format('(%s/%s)', room.round, room.times) local lst_player = self.roominfo.view:GetChild('lst_player') lst_player:RemoveChildrenToPool() @@ -741,7 +730,7 @@ local function __fillPlayItem(self, index, item) ) tex_game.text = __getLayerName(self, self.playIdList[index]) tex_jutifenleiName.text = __getLayerName1(self,self.playIdList[index]) - tex_paiming.text = index + tex_paiming.text = index end end @@ -802,6 +791,7 @@ 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 @@ -824,6 +814,8 @@ local function __fillGameItem(self, index, item) 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() @@ -885,8 +877,6 @@ local function __analysePlayListData(self) end local lst_layer = self.lst_layer - -- printlog("添加玩法====>>>>",count) - -- pt(curGroup.playList) lst_layer.numItems = count + 1 end @@ -1011,8 +1001,6 @@ function M:InitView(url) self._view:GetChild('tex_name1').text = self.curGroup.name -printlog("-----------------------sss--------------------") -pt(self.curGroup) -- self._view:GetChild('tex_p_name').text = ViewUtil.stringEllipsis(DataManager.SelfUser.nick_name) @@ -1041,7 +1029,9 @@ pt(self.curGroup) self.ctr_newmail = self._view:GetController('new_mail') self.lst_game = self._view:GetChild('game_list') - self.lst_game:SetVirtual() + 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 @@ -1049,19 +1039,39 @@ pt(self.curGroup) -- 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 end - local name=pas.data.icon - self.currentSelectItem = pas.data - self.currentGameItemName=name - self.lst_layer.selectedIndex = 0 - self:__refreshPay() - __analyseGameListData(self) - __analysePlayListData(self) - __fillRoomData(self) + -- 游戏类型列表点击事件:当用户点击某个游戏类型时,刷新玩法和房间列表 +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 + end + + -- self.line1 = self._view:GetChild('line1') --self.line1.visible = false self.lst_layer = self._view:GetChild('lst_layer') @@ -1237,6 +1247,64 @@ pt(self.curGroup) end ) + -- btn_qyg_dakai按钮:刷新列表页 + local btn_qyg_dakai = self._view:GetChild('btn_qyg_dakai') + if btn_qyg_dakai then + btn_qyg_dakai.onClick:Set( + function() + -- 如果嵌入了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() + groupMainView:FillData() + --printlog("GroupMainView FillData调用完成") + end) + end + end) + else + ViewUtil.ErrorTip(res.ReturnCode, '刷新牌友圈列表失败!') + end + end) + end + end + ) + end + -- local btn_cancel = self._view:GetChild('node_matching'):GetChild('btn_cancel') -- btn_cancel.onClick:Set( -- function() @@ -1284,9 +1352,76 @@ pt(self.curGroup) 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 end +function M:Reconnect() + self:__loadGroupData() +end + +-- 切换到另一个圈子的详情页 +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() + self._groupMainView_to_embed:FillData() + end) + end +end + +-- 嵌入GroupMainView到详情页中 +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 + function M:__saveLastData() if not self._get_data then self._get_data = true end local data = json.encode(self.curGroup.playList) @@ -1431,7 +1566,6 @@ function M:__joinRoom(room_id) room_id, false, function(response) - printlog("进入房间返回事件==========》》》") pt(response) if (response.ReturnCode == -1) then ViewUtil.CloseModalWait('join_room') @@ -1990,7 +2124,6 @@ end -- 显示各玩法体力值信息 function M:__refreshPay() - --printlog("1111111111111111111111111111",self.curGroup.hp) self.tex_fag.text = '' .. d2ad(self.curGroup.hp or 0) -- self.tex_diamo.text = self.curGroup.diamo @@ -2046,9 +2179,6 @@ function M:showPipei(play) self._pipeiTime = 20 end function M:hidePipei() - --print("hidePipei=============") - --print(self._view) - --print(self._view:GetController('pipei')) if self._view:GetController('pipei') then self._view:GetController('pipei').selectedIndex = 0 end @@ -2063,6 +2193,47 @@ function M:Reconnect() self:__loadGroupData() end +-- 嵌入GroupMainView到详情页中 +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 + -- 从原父节点移除 + if groupMainView._view.parent then + groupMainView._view.parent:RemoveChild(groupMainView._view) + end + -- 添加到lnfo_group容器 + container:AddChild(groupMainView._view) + + -- 延迟显示,确保FairyGUI内部状态稳定 + coroutine.start(function() + coroutine.wait(0.05) + if groupMainView._view and not groupMainView._view.isDisposed then + groupMainView._view.visible = true + end + end) + end +end + function M:Show() get_gps() BaseView.Show(self) @@ -2075,6 +2246,24 @@ function M:Show() end function M:Destroy() + -- 先执行恢复子视图的回调逻辑 + if self._groupMainView_to_embed and self._groupMainView_to_embed._view then + local groupMainView = self._groupMainView_to_embed + -- 将列表页移回原容器 + if groupMainView._originalParent and not groupMainView._view.isDisposed then + pcall(function() + -- 从当前父节点移除 + if groupMainView._view.parent then + groupMainView._view.parent:RemoveChild(groupMainView._view) + end + -- 添加到原父节点 + groupMainView._originalParent:AddChild(groupMainView._view) + groupMainView._originalParent = nil + groupMainView._view.visible = false + end) + end + end + BaseView.Destroy(self) UpdateBeat:Remove(self.__onUpdate, self) ImageLoad.Clear(self.class) diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua index 57b9fb9..8b99001 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua @@ -16,11 +16,13 @@ function GroupMainView.new(main_view, root_view,par_veiw) self._view = main_view self._root_view = root_view self._par_veiw = par_veiw + self:InitView() return self end function M:InitView(url) + --print(url) -- BlurView(self._view:GetChild("bg"),true) if DataManager.SelfUser.agent > 0 then @@ -106,15 +108,87 @@ function M:InitView(url) end) end) + -- btn_jiaru按钮:打开圈子列表页,类似btn_more_group的功能 + local btn_jiaru = self._view:GetChild('btn_jiaru') + if btn_jiaru then + btn_jiaru.visible = true + btn_jiaru.onClick:Set(function() + ViewUtil.ShowModalWait(self._root_view, "请稍等,获取牌友圈中...") + fgCtr:FG_GroupList(function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode == 0 then + local groups = DataManager.groups.groupList + if #groups == 0 then + -- 如果没有圈子,显示列表页让用户创建或加入 + self._view.visible = true + self:Show() + else + -- 有圈子,显示第一个圈子的详情页 + local curGroup = groups[1] + -- 读取牌友圈信息 + local filename = 'fginfo_' .. DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(filename) + local fg_info = not json_data and {} or json.decode(json_data) + + -- 创建GroupInfoView,传入根视图和列表页容器 + -- GroupMainView会被嵌入到GroupInfoView的lnfo_group组件中,显示所有圈子列表 + local info = GroupInfoView.new(curGroup, fg_info, self._root_view, self) + info:SetCallBack(function() + -- 关闭回调:恢复列表页到原位置 + if self and self._view and not self._view.isDisposed then + -- 将列表页移回原容器 + if self._originalParent then + self._originalParent:AddChild(self._view) + self._originalParent = nil + end + self._view.visible = false + end + end) + info:Show() + end + else + ViewUtil.ErrorTip(10000000, '获取牌友圈失败,请检查网络设置!') + end + end) + end) + end + local lst_group = self._view:GetChild('lst_group') lst_group.onClickItem:Add(function(context) local curGroup = context.data.data + + -- 判断当前GroupMainView是否被嵌入到GroupInfoView中 + if self._parentInfoView then + -- 如果被嵌入,调用父视图的切换方法 + --printlog("GroupMainView被嵌入,切换到圈子:", curGroup.id, curGroup.name) + self._parentInfoView:SwitchToGroup(curGroup) + return + end + + -- 正常模式:创建并显示GroupInfoView local info = GroupInfoView.new(curGroup, self.fg_info) self._groupInfoView = info info:SetCallBack(function() self._groupInfoView = nil - self:Show() - self._view.visible = true + -- 关闭详情页后刷新列表 + ViewUtil.ShowModalWait(self._root_view, "刷新中...") + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupList(function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode == 0 then + -- 刷新列表数据 + self:FillData() + self._view.visible = true + else + ViewUtil.ErrorTip(res.ReturnCode, '刷新列表失败!') + end + end) end) --info:Show() --self._view.visible = false @@ -224,7 +298,11 @@ function M:FillData() end local lst_group = self._view:GetChild('lst_group') - lst_group:RemoveChildrenToPool() + -- 使用pcall保护池操作,防止空引用异常 + pcall(function() + lst_group:RemoveChildrenToPool() + end) + for i = 1, #groups do local group = groups[i] 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 b29fd2f..4804709 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua @@ -35,6 +35,19 @@ function M:init(url) BaseWindow.init(self,url) self.hpData = {} + -- 【新增】初始化游戏类型筛选控制器 fennlieM + self.ctr_fennlieM = self._view:GetController('fennlieM') + if self.ctr_fennlieM then + -- 默认选中"麻将" (index 0),对应 gameType=1 + self.ctr_fennlieM.selectedIndex = 0 + + -- 监听控制器变化,当用户切换分类时刷新游戏列表 + self.ctr_fennlieM.onChanged:Add(function() + -- 重新填充游戏列表数据(根据新的分类筛选) + self:FillGameData() + end) + end + self:FillGameData() self._view:GetChild("btn_next").onClick:Set(function() @@ -64,30 +77,87 @@ end -- 显示游戏列表 function M:FillGameData() local index = 1 - -- 显示所有游戏 - local games = DataManager.SelfUser.games - local lst_game = self._view:GetChild("lst_game") - -- local n65 = lst_game:GetChild("n65") - printlog("jefe all games") - pt(games) - -- n65.visible = false - for i = 1, #games do - local game = games[i] + + -- 【新增】获取当前选中的游戏类型 (0=麻将, 1=扑克, 2=字牌) + local selectType = 1 -- 默认麻将(对应 gameType=1) + if self.ctr_fennlieM then + -- 控制器索引 0,1,2 对应 gameType 1,2,3 + selectType = self.ctr_fennlieM.selectedIndex + 1 + end + -- 【修复】由于 GameListView 内部硬编码读取 DataManager.SelfUser.games, + -- 我们需要临时替换全局数据源为筛选后的数据 + local originalGames = DataManager.SelfUser.games + local filteredGames = {} + + for i = 1, #originalGames do + local game = originalGames[i] + -- 检查游戏的 gameType 是否匹配选中的分类 + if game.gameType and tonumber(game.gameType) == selectType then + table.insert(filteredGames, game) + end + end + -- 如果没有筛选到游戏,使用全部游戏(兜底) + if #filteredGames == 0 then + filteredGames = originalGames + end + + -- 【关键】临时替换全局数据源 + DataManager.SelfUser.games = filteredGames + + -- 【修复】获取正确的容器:Win_CreateRoom 是容器,它内部有 lst_game + local container = self._view:GetChild("Win_CreateRoom") + if not container then + -- 恢复原始数据 + DataManager.SelfUser.games = originalGames + return + end + + -- 【修复】在创建新视图前,先清理旧视图和列表内容 + if self.gl_view then + -- 销毁旧的 GameListView 实例 + if self.gl_view.Destroy then + pcall(function() + self.gl_view:Destroy() + end) + end + self.gl_view = nil + end + + -- 【修复】清理容器内的 lst_game 列表项(但不移除固定组件如 btn_close) + local lst_game = container:GetChild("lst_game") + if lst_game then + -- 使用 numItems = 0 清空列表项,保留固定组件 + lst_game.numItems = 0 + end + + -- 确定默认选中索引 + for i = 1, #filteredGames do + local game = filteredGames[i] if (self.room_config and self.room_config.game_id == game.game_id) or i == 1 then index = i end end - self.gl_view = GameListView.new(lst_game,index,self.room_config) - local btn_close = lst_game:GetChild("btn_close") - btn_close.onClick:Set(function() - self:Destroy() - end) + + -- 【修复】创建新的游戏列表视图,传入容器(GameListView 内部会查找 lst_game) + self.gl_view = GameListView.new(container, index, self.room_config) + + local btn_close = container:GetChild("btn_close") + if btn_close then + btn_close.onClick:Set(function() + self:Destroy() + end) + end + -- 玩法名 if self.play then local tex_name = self._view:GetChild("tex_name") tex_name.text = self.play.name end -end + + -- 【关键】恢复原始数据源(避免影响其他地方) + DataManager.SelfUser.games = originalGames + +end local tuoguanTimeList={10,30,60,120,180,240,300} -- 显示玩法体力值配置 @@ -806,7 +876,6 @@ function M:__input_num(tex, filed, itype) local gfiv = GroupNumberInputView.new(self._root_view,function(num) tex.text = num if filed == "robot_room" then - --printlog("cccccccccccccccc ",num) self.hpData[filed] = (num) else self.hpData[filed] = ad2d(num) diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua index ea5180f..4d9c75d 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua @@ -14,7 +14,7 @@ function GroupMngGameListView.new(gid, blur_view) self._put_map = false self._new_hide = false self._queue = false - self._full = true + self._full = false self:init("ui://NewGroup/View_GroupGameList") self:InitView() return self @@ -116,7 +116,7 @@ function M:OnRenderItem(index, obj) exconfig:FillRoomConfig(r, data) gameStr = string.gsub(r.room_config:GetDes(), "\r", "") - gameStr = "[color=#009F50]玩法说明:[/color]".."[color=#435D81]"..gameStr.."[/color]" + gameStr = "[color=#FF6A00]玩法说明:[/color]".."[color=#434343]"..gameStr.."[/color]" end obj:GetChild("com_gameinfo"):GetChild("tex_room_info").text = hpStr.."\n"..gameStr diff --git a/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua b/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua index 9a65272..bb46499 100644 --- a/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua +++ b/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua @@ -69,7 +69,7 @@ function M:ShowDetails(play) exconfig:FillRoomConfig(r, data) gameStr = string.gsub(r.room_config:GetDes(), "\r", "") - gameStr = "[color=#009F50]玩法说明:[/color]".."[color=#435D81]"..gameStr.."[/color]" + gameStr = "[color=#FF6A00]玩法说明:[/color]".."[color=#434343]"..gameStr.."[/color]" return gameStr end diff --git a/wb_new_ui/.objs/metas/27vd145b/ep9w7ik3.info b/wb_new_ui/.objs/metas/27vd145b/ep9w7ik3.info new file mode 100644 index 0000000..5125057 --- /dev/null +++ b/wb_new_ui/.objs/metas/27vd145b/ep9w7ik3.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n17_vtgq": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/2d9xdj6z/75efcz.info b/wb_new_ui/.objs/metas/2d9xdj6z/75efcz.info index 809be82..4c3a915 100644 --- a/wb_new_ui/.objs/metas/2d9xdj6z/75efcz.info +++ b/wb_new_ui/.objs/metas/2d9xdj6z/75efcz.info @@ -1,19 +1,10 @@ { "objectStatus": { - "n71_vyn3": { - "hidden": true - }, - "n70_vyn3": { - "hidden": true - }, - "n67_vyn3": { + "n80_v4di": { "hidden": true }, "n63_10xl7": { "hidden": true - }, - "n72_hp03": { - "hidden": true } }, "fitScreen": "FitSize" diff --git a/wb_new_ui/.objs/metas/2d9xdj6z/lumrgj.info b/wb_new_ui/.objs/metas/2d9xdj6z/lumrgj.info index 2a49bdf..fe46e30 100644 --- a/wb_new_ui/.objs/metas/2d9xdj6z/lumrgj.info +++ b/wb_new_ui/.objs/metas/2d9xdj6z/lumrgj.info @@ -3,6 +3,15 @@ "n103_lumr": { "hidden": true }, + "n120_t3ax": { + "hidden": true + }, + "n117_xbqu": { + "hidden": true + }, + "n115_ker3": { + "hidden": true + }, "n112_ker3": { "hidden": true } diff --git a/wb_new_ui/.objs/metas/2d9xdj6z/nlwcgk.info b/wb_new_ui/.objs/metas/2d9xdj6z/nlwcgk.info index 0b05502..d69ce48 100644 --- a/wb_new_ui/.objs/metas/2d9xdj6z/nlwcgk.info +++ b/wb_new_ui/.objs/metas/2d9xdj6z/nlwcgk.info @@ -1,15 +1,27 @@ { "objectStatus": { + "n8_nlwc": { + "hidden": true + }, + "n14_mkh9": { + "hidden": true + }, + "n26_ht5v": { + "hidden": true + }, "n24_cvc8": { "hidden": true }, - "n27_ht5v": { + "n18_ovii": { "hidden": true }, - "n18_ovii": { - "locked": true + "n25_rtih": { + "hidden": true }, - "n26_ht5v": { + "n29_igbb": { + "hidden": true + }, + "n27_ht5v": { "hidden": true }, "n9_bqt1": { diff --git a/wb_new_ui/.objs/metas/2d9xdj6z/v4di7coq.info b/wb_new_ui/.objs/metas/2d9xdj6z/v4di7coq.info new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/wb_new_ui/.objs/metas/2d9xdj6z/v4di7coq.info @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info b/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info index 499fece..65b6dfd 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info +++ b/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info @@ -1,7 +1,7 @@ { "objectStatus": { - "n130_w111": { - "collapsed": true + "n204_jvvo": { + "hidden": true }, "n233_o6b1": { "hidden": true @@ -9,10 +9,22 @@ "n191_xsk4": { "hidden": true }, + "n78_i7lq": { + "hidden": true + }, + "n130_w111": { + "hidden": true + }, + "n200_isix": { + "hidden": true + }, + "n88_kxzv": { + "hidden": true + }, "n238_dg1v": { "hidden": true }, - "n78_i7lq": { + "n186_p0pd": { "hidden": true } }, diff --git a/wb_new_ui/.objs/metas/m7iejg46/jiu8hef.info b/wb_new_ui/.objs/metas/m7iejg46/jiu8hef.info index 2850205..9e26dfe 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/jiu8hef.info +++ b/wb_new_ui/.objs/metas/m7iejg46/jiu8hef.info @@ -1,10 +1 @@ -{ - "objectStatus": { - "n28_wqg2": { - "hidden": true - }, - "n27_wqg2": { - "hidden": true - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/kwi0hk1.info b/wb_new_ui/.objs/metas/m7iejg46/kwi0hk1.info index e42104f..2217847 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/kwi0hk1.info +++ b/wb_new_ui/.objs/metas/m7iejg46/kwi0hk1.info @@ -1,9 +1,3 @@ { - "objectStatus": { - "n6_y6xi": { - "hidden": true - } - }, - "adaptiveTest": true, "fitScreen": "FitSize" } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/kwi0hk4.info b/wb_new_ui/.objs/metas/m7iejg46/kwi0hk4.info index b818230..c60c85f 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/kwi0hk4.info +++ b/wb_new_ui/.objs/metas/m7iejg46/kwi0hk4.info @@ -1,11 +1,49 @@ { "objectStatus": { - "n18_rpaz": { + "n24_nk4v": { + "hidden": true, + "collapsed": true + }, + "n15_meye": { + "hidden": true + }, + "n11_kwi0": { + "hidden": true + }, + "n12_kwi0": { "hidden": true }, "n16_rpaz": { + "hidden": true, + "collapsed": true + }, + "n18_rpaz": { + "hidden": true + }, + "n20_rpaz": { + "hidden": true, + "collapsed": true + }, + "n9_kwi0": { + "hidden": true + }, + "n27_u19j": { + "hidden": true + }, + "n1_kwi0": { + "hidden": true + }, + "n19_rpaz": { + "collapsed": true + }, + "n6_kwi0": { + "hidden": true + }, + "n2_kwi0": { + "hidden": true + }, + "n14_meye": { "hidden": true } - }, - "adaptiveTest": true + } } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/kwi0hkb.info b/wb_new_ui/.objs/metas/m7iejg46/kwi0hkb.info index c0e420a..e5131ba 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/kwi0hkb.info +++ b/wb_new_ui/.objs/metas/m7iejg46/kwi0hkb.info @@ -2,6 +2,9 @@ "objectStatus": { "n160_10xl7": { "hidden": true + }, + "n162_10xl7": { + "collapsed": true } }, "adaptiveTest": true, diff --git a/wb_new_ui/.objs/workspace.json b/wb_new_ui/.objs/workspace.json index c9ddd3c..88aaea4 100644 --- a/wb_new_ui/.objs/workspace.json +++ b/wb_new_ui/.objs/workspace.json @@ -5,56 +5,31 @@ "ui://2d9xdj6zfn7fao", "ui://2zlli80mw9te0", "ui://m7iejg4610snh5j", - "ui://m7iejg46p0pdhvp", - "ui://m7iejg46jiu8hef", - "ui://m7iejg4694qg7icy", - "ui://m7iejg46pw157i8w", - "ui://m7iejg46csp47i3z" + "ui://m7iejg46kwi0hk1", + "ui://m7iejg46kwi0hkb", + "ui://2d9xdj6z75efcz", + "ui://2d9xdj6z97mlcin" ], - "test.device": "Xiaomi 9", + "test.device": "iPad", "canvasColor": 10066329, "auxline2": true, - "doc.activeDoc": "ui://m7iejg4610snh5j", + "doc.activeDoc": "ui://2d9xdj6z75efcz", "libview.twoColumn": false, "libview.expandedNodes": [ - "1hl55dqm", - "/", - "du0ovweo", - "/", - "iwpp66na", - "/", - "70k0xjl0", - "/", - "v09du5dj", - "/", - "d1qrzqpr", - "/", - "lv2le67t", - "/", - "fm39zduw", - "/", - "qubt49z8", - "/", - "eyxz924g", - "/", - "v2emygzo", - "/", - "4wmd3o8g", - "/", - "dbnd189a", - "/", - "z3z0ysur", - "/", - "96mvx2ml", - "/", - "ac1fkfb1", - "/", - "jnrucnxa", - "/", - "okksar3v", - "/", - "boq0ohep", + "2d9xdj6z", "/", + "2d9xdj6z", + "/component/", + "2d9xdj6z", + "/component/games/", + "2d9xdj6z", + "/component/games/component/", + "2d9xdj6z", + "/component/group/", + "2d9xdj6z", + "/images/", + "2d9xdj6z", + "/images/LobbyMui/", "m7iejg46", "/", "m7iejg46", @@ -66,7 +41,7 @@ "m7iejg46", "/images/NGXiangTangMui/", "m7iejg46", - "/images/room/" + "/mgr/" ], "auxline1": true, "snapToGrid": true, diff --git a/wb_new_ui/assets/Common/Gcm_Window_Full.xml b/wb_new_ui/assets/Common/Gcm_Window_Full.xml index 171fc85..6b6b78b 100644 --- a/wb_new_ui/assets/Common/Gcm_Window_Full.xml +++ b/wb_new_ui/assets/Common/Gcm_Window_Full.xml @@ -6,7 +6,7 @@ - + diff --git a/wb_new_ui/assets/Common/MessageBox1.xml b/wb_new_ui/assets/Common/MessageBox1.xml index 936e75b..7d321d1 100644 --- a/wb_new_ui/assets/Common/MessageBox1.xml +++ b/wb_new_ui/assets/Common/MessageBox1.xml @@ -1,15 +1,23 @@ - + - + - - -