diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index c6726d63..d3870929 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -233,6 +233,7 @@ end -- 添加玩法 function M:OnEvtAddPlay(evt_data) local group = DataManager.groups:get(self.groupId) + evt_data.gameType = ExtendManager.GetGameData(evt_data.gameId).gameType group:addPlay(evt_data) local pid = evt_data.id DispatchEvent(self._dispatcher, GroupMgrEvent.AddPlay, pid) diff --git a/lua_probject/base_project/Game/Controller/LoginController.lua b/lua_probject/base_project/Game/Controller/LoginController.lua index 075a0c70..e08f819d 100644 --- a/lua_probject/base_project/Game/Controller/LoginController.lua +++ b/lua_probject/base_project/Game/Controller/LoginController.lua @@ -15,7 +15,8 @@ end local _LocalConfigAllGame = { -- 10, 33, -- 90, - 66,22,90 + -- 22, + 66,90 } local FilterGame = function(games) diff --git a/lua_probject/base_project/Game/IGameInfo.lua b/lua_probject/base_project/Game/IGameInfo.lua index a5a6cbc7..e7bd553e 100644 --- a/lua_probject/base_project/Game/IGameInfo.lua +++ b/lua_probject/base_project/Game/IGameInfo.lua @@ -21,10 +21,45 @@ function M:SelectedCardNum() end function M:SelectedConfigData() - return {} + local data = {} + local com_editSetting = self.gl_view:GetModeData().data._config:GetChild("com_editSetting") + + self.cGps = com_editSetting:GetController("cGps") + self.cTuoguan = com_editSetting:GetController("cTuoguan") + -- GPS设置 + local dis = 0 + if self.cGps.selectedIndex == 0 then + dis = 100 + elseif self.cGps.selectedIndex == 1 then + dis = 500 + elseif self.cGps.selectedIndex == 2 then + dis = 0 + end + data.GPSDetection = dis + + -- 托管 + local time = 0 + if self.cTuoguan.selectedIndex == 1 then + time = 30 + elseif self.cTuoguan.selectedIndex == 2 then + time = 60 + elseif self.cTuoguan.selectedIndex == 3 then + time = 120 + end + data.tuoguan_active_time = time + + --其余默认值 + data.isNonnegative = 1 + data.hp_no_limit = 0 + data.tuoguan = true + data.tuoguan_active_timeIndex = self.cTuoguan.selectedIndex + data.tuoguan_result_type = 1 + + return data end function M:FillData() + end function M:ShowRoomPrice(ctype) @@ -58,14 +93,6 @@ function M:ShowVariablePrice(ctype) tex_price.text = price end end - - -- 显示房主支付、aa支付的价格,tex_aa/tex_owner - -- local tex_aa = self._config:GetChild("tex_aa") - -- local tex_owner = self._config:GetChild("tex_owner") - -- local opt = self._config:GetController("round").selectedIndex - -- local price = self._game_data[string.format("pay%s_%s", opt + 1, self._maxPlayer)] - -- tex_aa.text = math.ceil(price / self._maxPlayer) - -- tex_owner.text = price end function M:SetDefault() @@ -126,4 +153,49 @@ function M:LoadConfigOneInfo(data, hpdata, name) return returnString end +function M:GetHpData() + local hpData = {} + -- 通用设置 + local com_editSetting = self._config:GetChild("com_editSetting") + + local cJiesan = com_editSetting:GetController("cJiesan") + local cGongneng = com_editSetting:GetController("cGongneng") + local cChat = com_editSetting:GetController("cChat") + local cMisslie = com_editSetting:GetController("cMisslie") + + -- 解散 + hpData.JieShan = cJiesan.selectedIndex + 1 + -- 功能 + hpData.GongNeng = cGongneng.selectedIndex + 1 + -- 开启聊天 + hpData.BanChat = cChat.selectedIndex + -- 开启表情互动 + hpData.BanMissile = cMisslie.selectedIndex + + --一下是大联盟数据,全部采取默认值 + hpData.type = 1 + hpData.rewards_val = 100 + hpData.anchou_rewards_val = 100 + hpData.xipai_rewards_val = 100 + hpData.rewards_type = 1 + hpData.xipai_rewardType = 3 + hpData.anchou_rewardType = 3 + hpData.rewardValueType = 1 + hpData.anchou_rewardValueType = 1 + hpData.xipai_rewardValueType = 1 + hpData.limitPlay = 1000 + hpData.limitloot = 0 + hpData.limitInRoom = 0 + hpData.limitPump = 0 + hpData.basePump = 0 + hpData.robot_room = 0 + hpData.tex_times_room = 1000 + hpData.times = 1000 + hpData.rewards_list = {} + hpData.rewards_list.cb_proportion = 0 + hpData.rewards_list.UpperLimit = 0 + hpData.rewards_list.UpperLimitReward = 0 + return hpData +end + return M diff --git a/lua_probject/base_project/Game/View/FamilyViewZuo.lua b/lua_probject/base_project/Game/View/FamilyViewZuo.lua index e71ac06d..30b2d435 100644 --- a/lua_probject/base_project/Game/View/FamilyViewZuo.lua +++ b/lua_probject/base_project/Game/View/FamilyViewZuo.lua @@ -93,7 +93,7 @@ function M:FamilyTableRenderer(index, obj) local roomList = self._group.rooms local tmp local showDeatilFct = function() - + end if index < #playList then -- 默认玩法,开桌子之类的 tmp = playList[index + 1] @@ -105,8 +105,11 @@ function M:FamilyTableRenderer(index, obj) end) end obj:GetChild('icon').onClick:Set(function(context) - self:ClickTableShowDetail(context,{type =1}) + self:ClickTableShowDetail({ type = 1, info = tmp, index = index }) end) + if self._view:GetController('showPlayDetail').selectedIndex == 1 then + self:ClickTableShowDetail({ type = 1, info = tmp, index = index }) + end elseif index - #playList < #roomList then --存在的桌子 local roomInfo = roomList[index - #playList + 1] tmp = self._group:getPlay(roomInfo.pid) @@ -122,13 +125,16 @@ function M:FamilyTableRenderer(index, obj) btn:GetController('zuo').selectedIndex = 0 btn:GetChild("btn_head").icon = "ui://Family/icon_luozuo" btn.onClick:Set(function(context) - self:ClickJoinRoom(context, tmp, roomInfo) + self:ClickJoinRoom(context, roomInfo) end) end end obj:GetChild('icon').onClick:Set(function(context) - self:ClickTableShowDetail(context,{type =2,info=roomInfo}) + self:ClickTableShowDetail({ type = 2, info = roomInfo, index = index }) end) + if self._view:GetController('showPlayDetail').selectedIndex == 1 then + self:ClickTableShowDetail({ type = 2, info = roomInfo, index = index }) + end end obj:GetController('playerNum').selectedIndex = tmp.maxPlayers - 2 obj:GetChild('text_playName').text = tmp.name @@ -209,19 +215,83 @@ function M:ClickMachRoom(context, playinfo) ) end -function M:ClickTableShowDetail(context,data) +--点击桌子查看信息 +function M:ClickTableShowDetail(data) local data = data or {} if data.type then - if data.type == 1 then - - elseif data.type == 2 then + self._view:GetController('showPlayDetail').selectedIndex = 1 + local detailView = self._view:GetChild('comp_playDetail') + local detailType = detailView:GetController('type') + local tableIcon = self._viewList_tableList:GetChildAt(data.index):GetChild('icon') + local gxy = tableIcon:LocalToGlobal(Vector2.New(tableIcon.width, tableIcon.height) / 2) + detailView.xy = self._view:GlobalToLocal(gxy) - Vector2.New(detailView.width / 2, detailView.height) + local playinfo = data.info + detailView:GetChild('btn_createRoom').onClick:Set(function(context) + self:ClickMachRoom(context, data.info) + end) + + detailView:GetChild('btn_joinRoom').onClick:Set(function(context) + self:ClickJoinRoom(context, data.info) + end) + + detailView:GetChild('btn_inviteRoom').onClick:Set(function(context) + ViewUtil:ErrorTip("暂时还未联通微信") + end) + + detailView:GetChild('btn_delRoom').onClick:Set(function(context) + self:JieSanRomm(self._group.id,data.info.id) + end) + + if data.type == 1 then + detailType.selectedIndex = 0 + elseif data.type == 2 then + local stype = 1 + if self._group.lev and self._group.lev == 1 then + stype = stype + 2 + end + if playinfo.plist and #playinfo.plist > 0 and playinfo.plist[1].aid == DataManager.SelfUser.account_id then + stype = stype + 1 + end + playinfo = self._group:getPlay(playinfo.pid) + detailType.selectedIndex = stype end + detailView:GetChild('text_playDetail').text = ExtendManager.GetExtendConfig(playinfo.gameId):GetGameInfo() + :LoadConfigToDetail(playinfo.config, playinfo.hpData) end end +--点击解散房间 +function M:JieSanRomm(groupId, roomId) + local _curren_msg = + MsgWindow.new( + self._root_view, + '确定要解散该房间吗?', + MsgWindow.MsgMode.OkAndCancel + ) + _curren_msg.onOk:Add( + function() + ViewUtil.ShowModalWait2(self._root_view) + local fgCtr = ControllerManager.GetController(NewGroupController) + + fgCtr:FG_RemoveRoom( + groupId, + roomId, + function(res) + ViewUtil.CloseModalWait2() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '删除房间失败!') + return + end + end + ) + end + ) + _curren_msg:Show() +end + --点击桌子进入游戏 -function M:ClickJoinRoom(context, playinfo, room) +function M:ClickJoinRoom(context, room) local group = DataManager.CurrenGroup local roomCtr = ControllerManager.GetController(RoomController) roomCtr:PublicJoinRoom( @@ -243,7 +313,8 @@ function M:ClickJoinRoom(context, playinfo, room) else UpdateBeat:Remove(self.OnUpdate, self) FamilyView.lastId = group.id - ViewManager.ChangeView(ViewManager.View_Main, playinfo.gameId, { _flag_showTip = true }) + ViewManager.ChangeView(ViewManager.View_Main, self._group:getPlay(room.pid).gameId, + { _flag_showTip = true }) ViewUtil.CloseModalWait2() end end, diff --git a/lua_probject/base_project/Game/View/FamilyZuo/FamilyGamePlay.lua b/lua_probject/base_project/Game/View/FamilyZuo/FamilyGamePlay.lua new file mode 100644 index 00000000..fff2f2a9 --- /dev/null +++ b/lua_probject/base_project/Game/View/FamilyZuo/FamilyGamePlay.lua @@ -0,0 +1,143 @@ +local FamilyGamePlayView = {} + +local M = FamilyGamePlayView + +function FamilyGamePlayView.new(data, callback) + setmetatable(M, { __index = BaseWindow }) + local self = setmetatable({}, { __index = M }) + self.class = "FamilyGamePlayView" + self._data = data or {} + self._callback = callback + self._close_destroy = true + self._full = true + self._full_offset = false + self:init("ui://Family/FamilyGamePlay") + return self +end + +function M:init(url) + getmetatable(M).__index.init(self, url) + + local view = self._view + self._viewList_left = view:GetChild('list_left') + self._viewList_left.itemRenderer = handler(self, self.GameTypeRenderer) + self._viewList_left.onClickItem:Set(handler(self, self.GameTypeClick)) + + self._viewComp_GameList = view:GetChild('page').component + self._viewList_GameList = self._viewComp_GameList:GetChild('list_left') + self._viewList_GameList.itemRenderer = handler(self, self.GameListRenderer) + self._viewList_GameList.onClickItem:Set(handler(self, self.GameListClick)) + + self.orderList = { { name = "麻将", list = {} }, { name = "扑克", list = {} }, { name = "字牌", list = {} } } + + self._viewComp_GameList:GetChild('btn_confirm').onClick:Set(handler(self, self.ClickCreate)) + + self:FillData() +end + +--创建玩法大分类-- +function M:GameTypeRenderer(index, obj) + local info = self.orderList[index + 1] + obj:GetChild('text_down').text = info.name + obj:GetChild('text_up').text = info.name +end + +function M:GameTypeClick(context) + self._viewList_GameList.numItems = #self.orderList[context.sender.selectedIndex + 1].list +end + +--玩法列表-- +function M:GameListRenderer(index, obj) + local info = self.orderList[self._viewList_left.selectedIndex + 1].list[index + 1] + obj.text = info.name +end + +function M:GameListClick(context) + local info = self.orderList[self._viewList_left.selectedIndex + 1].list[context.sender.selectedIndex + 1] + local mode = ExtendManager.GetExtendConfig(info.game_id):GetGameInfo() + ViewUtil.LoadPage(self._viewComp_GameList:GetChild('page'), mode:GetPageURL(), function(view) + mode._config = view + mode:FillData() + if self._data.playInfo then + mode:LoadConfigData(json.decode(self._data.playInfo.config)) + end + end) +end + +----------------- + +--点击创建玩法 +function M:ClickCreate() + ViewUtil.ShowModalWait2(self._root_view) + local fgCtr = ControllerManager.GetController(NewGroupController) + local group = DataManager.CurrenGroup + local info = self.orderList[self._viewList_left.selectedIndex + 1].list[self._viewList_GameList.selectedIndex + 1] + local mod = ExtendManager.GetExtendConfig(info.game_id):GetGameInfo() + local _data = mod:SelectedConfigData() + local hpData = mod:GetHpData() + _data.game_id = info.game_id + self.table_color = 0 + local functionName = self._data.playInfo and fgCtr.FG_UpdatePlay or fgCtr.FG_AddPlay + functionName(fgCtr, group.id, info.game_id, _data, info.name, hpData, 1, group.type, self.table_color, + function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait2() + + if res.ReturnCode == 0 then + ViewUtil.ErrorTip(-1, "添加玩法成功") + if self._callback then + self._callback() + end + self:Destroy() + else + ViewUtil.ErrorTip(res.ReturnCode, "添加玩法失败!") + end + end) +end + +function M:FillData() + local games = DataManager.SelfUser.games + local playInfo = self._data.playInfo + local selectType = 0 + local selectGame = 0 + local chooseGameId + if playInfo then + selectType = playInfo.gameType - 1 + chooseGameId = playInfo.gameId + end + for i, v in ipairs(games) do + if chooseGameId == v.game_id then + selectGame = #self.orderList[v.gameType].list + end + table.insert(self.orderList[v.gameType].list, v) + end + self._viewList_left.numItems = #self.orderList + self._viewList_left.selectedIndex = selectType + self._viewList_GameList.numItems = #self.orderList[selectType + 1].list + self._viewList_GameList.selectedIndex = selectGame + if #self.orderList[selectType + 1].list > 0 then + self:GameListClick({ sender = { selectedIndex = selectGame } }) + end + + + self:Show() +end + +-- 打开窗口 +function M:Show() + getmetatable(M).__index.Show(self) +end + +-- 关闭窗口 +function M:Close() + getmetatable(M).__index.Close(self) +end + +-- 销毁窗口 +function M:Destroy() + getmetatable(M).__index.Destroy(self) +end + +return M diff --git a/lua_probject/base_project/Game/View/FamilyZuo/FamilyPlayListView.lua b/lua_probject/base_project/Game/View/FamilyZuo/FamilyPlayListView.lua index 604a1135..90f6e90d 100644 --- a/lua_probject/base_project/Game/View/FamilyZuo/FamilyPlayListView.lua +++ b/lua_probject/base_project/Game/View/FamilyZuo/FamilyPlayListView.lua @@ -1,3 +1,5 @@ +local FamilyManagerView = import(".FamilyManagerView") + local FamilyPlayListView = {} local M = FamilyPlayListView @@ -15,9 +17,17 @@ end function M:init(url) getmetatable(M).__index.init(self,url) + local view = self._view + + view:GetChild('btn_addPlay').onClick:Set(handler(self,self.AddPlayClick)) + self:FillData() end +function M:AddPlayClick() + FamilyManagerView.new({frsitIndex=2}) +end + function M:FillData() self:Show() end diff --git a/lua_probject/base_project/Game/View/FamilyZuo/ManagerChild_GamePlayView.lua b/lua_probject/base_project/Game/View/FamilyZuo/ManagerChild_GamePlayView.lua index 215fc729..0802b138 100644 --- a/lua_probject/base_project/Game/View/FamilyZuo/ManagerChild_GamePlayView.lua +++ b/lua_probject/base_project/Game/View/FamilyZuo/ManagerChild_GamePlayView.lua @@ -1,4 +1,5 @@ local GroupGameSettingView = import("..NewGroup.MngView.GroupGameSettingView_jaingxi") +local FamilyGamePlay = import(".FamilyGamePlay") local ManagerChild_GamePlayView = {} @@ -20,21 +21,13 @@ function M:init(url) return end local page = root._view:GetChild('page') - self:LoadPage(page, url, function(view) + ViewUtil.LoadPage(page, url, function(view) local group = DataManager.CurrenGroup self._view = view view:GetChild('list_gameName').itemRenderer = handler(self, self.GamePlayRenderer) view:GetChild('list_gameName').onClickItem:Set(handler(self, self.GamePlayClick)) view:GetChild('btn_addPlay').onClick:Set(function() - local tem = GroupGameSettingView.new(self.blur_view, group.id, 0, nil, function(play) - group:addPlay(play) - if #DataManager.CurrenGroup.playList == 1 then - self:FillData() - else - view:GetChild('list_gameName').numItems = #DataManager.CurrenGroup.playList - end - end) - tem:Show() + FamilyGamePlay.new({},handler(self,self.FillData)) end) view:GetChild('btn_delPlay').onClick:Set(function() local fgCtr = ControllerManager.GetController(NewGroupController) @@ -59,28 +52,13 @@ function M:init(url) _curren_msg:Show() end) view:GetChild('btn_updatePlay').onClick:Set(function() - + FamilyGamePlay.new({playInfo = DataManager.CurrenGroup.playList[view:GetChild('list_gameName').selectedIndex + 1]},handler(self,self.FillData)) end) self:FillData() end) end ---确保页面加载后再渲染初始化数据 -function M:LoadPage(loader, url, callback) - loader.url = url - - if loader.component then - callback(loader.component) - else - FrameTimer.New(function() - if loader.component then - callback(loader.component) - end - end, 1):Start() - end -end - function M:GamePlayRenderer(index, obj) obj.text = DataManager.CurrenGroup.playList[index + 1].name end @@ -102,7 +80,11 @@ end function M:FillData() local playList = DataManager.CurrenGroup.playList local view = self._view - view:GetChild('list_gameName').numItems = #playList + if view:GetChild('list_gameName').numItems == #playList then + view:GetChild('list_gameName'):RefreshVirtualList() + else + view:GetChild('list_gameName').numItems = #playList + end if #playList > 0 then view:GetChild('list_gameName').selectedIndex = 0 self:GamePlayClick() diff --git a/lua_probject/base_project/Game/View/FamilyZuo/ManagerChild_PlayerView.lua b/lua_probject/base_project/Game/View/FamilyZuo/ManagerChild_PlayerView.lua index f534656d..c30df99d 100644 --- a/lua_probject/base_project/Game/View/FamilyZuo/ManagerChild_PlayerView.lua +++ b/lua_probject/base_project/Game/View/FamilyZuo/ManagerChild_PlayerView.lua @@ -19,7 +19,7 @@ function M:init(url) end ViewUtil.ShowModalWait2() local page = root._view:GetChild('page') - self:LoadPage(page, url, function(view) + ViewUtil.LoadPage(page, url, function(view) self._view = view view:GetController('page').onChanged:Set(handler(self, self.PageChanged)) view:GetChild('list_menber').itemRenderer = handler(self, self.MenberItemRenderer) @@ -28,21 +28,6 @@ function M:init(url) end) end ---确保页面加载后再渲染初始化数据 -function M:LoadPage(loader, url, callback) - loader.url = url - - if loader.component then - callback(loader.component) - else - FrameTimer.New(function() - if loader.component then - callback(loader.component) - end - end, 1):Start() - end -end - function M:MenberItemRenderer(index, obj) local numberInfo = self._fillData[index + 1] if not self._fillType or self._fillType == 1 then diff --git a/lua_probject/base_project/Game/View/ViewUtil.lua b/lua_probject/base_project/Game/View/ViewUtil.lua index 8e169ee8..9223c876 100644 --- a/lua_probject/base_project/Game/View/ViewUtil.lua +++ b/lua_probject/base_project/Game/View/ViewUtil.lua @@ -430,3 +430,18 @@ function ViewUtil.__openWx() GameApplication.Instance:WXOnlyOpen(1, function(...) end) end + +--确保页面加载后再渲染初始化数据 +function ViewUtil.LoadPage(loader, url, callback) + loader.url = url + + if loader.component then + callback(loader.component) + else + FrameTimer.New(function() + if loader.component then + callback(loader.component) + end + end, 1):Start() + end +end diff --git a/lua_probject/base_project/table/Table_Error_code.lua b/lua_probject/base_project/table/Table_Error_code.lua index e99f51bf..e2bc1159 100644 --- a/lua_probject/base_project/table/Table_Error_code.lua +++ b/lua_probject/base_project/table/Table_Error_code.lua @@ -38,7 +38,7 @@ Table_Error_code_Map = { [28] = { id = 28, note = "多次登录失败,禁止登录,请过段时间再次尝试" }, -- [101] = { id = 101, note = "请检查您的网络设置" }, --请检查您的网络设置,暂时注释 [102] = { id = 102, note = "网络连接超时" }, - [500] = { id = 500, note = "" }, + -- [500] = { id = 500, note = "" }, [999] = { id = 999, note = "未知错误" }, [17] = { id = 17, note = "奖券不足" }, [53] = { id = 53, note = "与桌上玩家IP相同,进入房间失败" }, diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXGameInfo.lua index bd0c1319..5f9b0d3a 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXGameInfo.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXGameInfo.lua @@ -38,66 +38,35 @@ function M:FillData() com_editSetting:GetController("oneRound").selectedIndex = 0 end end) - -- if oldGameVersion == 2 then - -- self._config:GetController("xipai").selectedIndex = 0 +end - -- self.xipaiValueText = self._config:GetChild('xipaifen') - -- self.xipaiValueText.text = 1 - -- self.xipaiValue = 1 +function M:FillDataNew() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_FuZhou/Label_Detail_83") - -- self.anchouValueText = self._config:GetChild('anchoufen') - -- self.anchouValueText.text = 1 - -- self.anchouValue = 1 + local jiangmaSlider = self._config:GetChild("n92") + jiangmaSlider.onChanged:Set(function() + self._config:GetChild("n93").text = string.format("奖%s马", Mathf.Round(jiangmaSlider.value) * 2) + end) - -- local btn_cr = self._config:GetChild('sdsrbtn') - -- btn_cr.onClick:Set( - -- function() - -- local gniv = GroupNumberInputView_Game.new(nil, function(num) - -- local value = limit - -- if otype == 1 then - -- value = value + ad2d(num) - -- elseif otype == -1 then - -- value = value - ad2d(num) - -- else - -- value = ad2d(num) - -- end + local com_editSetting = self._config:GetChild("com_editSetting") - -- if value < 0 then - -- ViewUtil.ErrorTip(1, "输入数据异常!") - -- end + com_editSetting:GetController("cGps").selectedIndex = 2 - -- self.xipaiValueText.text = value / 1000 - -- self.xipaiValue = value / 1000 - -- end, 3, nil) - -- gniv:Show() - -- end - -- ) - - - -- local btn_cr2 = self._config:GetChild('anchoubtn') - -- btn_cr2.onClick:Set( - -- function() - -- local gniv = GroupNumberInputView_Game.new(nil, function(num) - -- local value = limit - -- if otype == 1 then - -- value = value + ad2d(num) - -- elseif otype == -1 then - -- value = value - ad2d(num) - -- else - -- value = ad2d(num) - -- end - - -- if value < 0 then - -- ViewUtil.ErrorTip(1, "输入数据异常!") - -- end - - -- self.anchouValueText.text = value / 1000 - -- self.anchouValue = value / 1000 - -- end, 3, nil) - -- gniv:Show() - -- end - -- ) - -- end + local ctr_round = self._config:GetController("round") + if ctr_round.selectedIndex == 0 then + com_editSetting:GetController("oneRound").selectedIndex = 1 + else + com_editSetting:GetController("oneRound").selectedIndex = 0 + end + self._config:GetController("round").onChanged:Set(function() + if ctr_round.selectedIndex == 0 then + com_editSetting:GetController("oneRound").selectedIndex = 1 + else + com_editSetting:GetController("oneRound").selectedIndex = 0 + end + end) end local _help_url = "ui://Info_MJ_FuZhou/Com_help" @@ -120,6 +89,10 @@ function M:GetPlayList() return _play_list end +function M:GetPageURL() + return "ui://Info_MJ_FuZhou/Label_Detail_83" +end + function M:SelectedConfigData() local _config = self._config local round = _config:GetController("round").selectedIndex + 1 diff --git a/lua_probject/extend_project/extend/poker/duoduo/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/duoduo/EXGameInfo.lua index 62d94db6..062dd7fa 100644 --- a/lua_probject/extend_project/extend/poker/duoduo/EXGameInfo.lua +++ b/lua_probject/extend_project/extend/poker/duoduo/EXGameInfo.lua @@ -16,11 +16,13 @@ function EXGameInfo.new(blur_view) end function M:FillData(view, index) + getmetatable(M).__index:FillData(view, index) self._maxPlayer = 2 -- 默认玩家人数 self._roundChoice = 5 -- 回合选项数 -- if oldGameVersion == 1 then - self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_DuoDuo/Label_Detail_Play") + + self._config = UIPackage.CreateObjectFromURL(self:GetPageURL()) local com_editSetting = self._config:GetChild("com_editSetting") @@ -79,6 +81,10 @@ function M:GetIconUrl1() return _icon_url1 end +function M:GetPageURL() + return "ui://Info_Poker_DuoDuo/Label_Detail_Play" +end + local _play_list = { "15张玩法", "16张玩法" } function M:GetPlayList() return _play_list @@ -158,6 +164,7 @@ function M:LoadConfigData(data) end function M:SelectedConfigData() + local _data = getmetatable(M).__index:SelectedConfigData() local _config = self._config local round = _config:GetController("round").selectedIndex local handcard = _config:GetController("handcard").selectedIndex @@ -207,7 +214,6 @@ function M:SelectedConfigData() end ---- - local _data = {} _data["account_id"] = DataManager.SelfUser.Id -- _data["AA"] = AA -- _data["willBeOut"] = willBeOut + 1 diff --git a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua index 973ce45f..c5a62d24 100644 --- a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua +++ b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua @@ -20,7 +20,8 @@ function M:FillData(view, index) self._roundChoice = 5 -- 回合选项数 -- if oldGameVersion == 1 then - self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Label_Detail_Play") + -- self._config = UIPackage.CreateObjectFromURL(self:GetPageURL()) + local com_editSetting = self._config:GetChild("com_editSetting") @@ -79,6 +80,10 @@ function M:GetIconUrl1() return _icon_url1 end +function M:GetPageURL() + return "ui://Info_Poker_RunFastNew/Label_Detail_Play" +end + local _play_list = { "15张玩法", "16张玩法" } function M:GetPlayList() return _play_list diff --git a/wb_new_ui/assets/Common/buttons/Btn_CheckBox.xml b/wb_new_ui/assets/Common/buttons/Btn_CheckBox.xml index 34eb1713..731f0de0 100644 --- a/wb_new_ui/assets/Common/buttons/Btn_CheckBox.xml +++ b/wb_new_ui/assets/Common/buttons/Btn_CheckBox.xml @@ -1,10 +1,15 @@ - - + + - + + - + + + + +