From 494e12da8a9f504a1b0363ba0c573a607952076b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Tue, 18 Nov 2025 18:49:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/View/NewGroup/GroupInfoView.lua | 38 +- .../extend/majiang/changsha/EXGameInfo.lua | 519 ++- .../extend/majiang/hongzhong/EXGameInfo.lua | 366 +- .../zipai/changdepaohuzi/EXGameInfo.lua | 244 +- .../extend/zipai/fulushou/EXGameInfo.lua | 281 +- .../zipai/yueyangwaihuzi/EXGameInfo.lua | 258 +- .../.objs/metas/2d9xdj6z/fn7fao.info | 7 +- fk101/wb_new_ui/assets/Lobby/Main.xml | 21 +- .../assets/NewGroup/Main_GroupInfo.xml | 7 +- .../component/Lst_info/Btn_Game_Type.xml | 10 +- .../NewGroup/images/group_changsha0.png | Bin 0 -> 5845 bytes .../NewGroup/images/group_changsha1.png | Bin 0 -> 5879 bytes .../NewGroup/images/group_fulushou0.png | Bin 0 -> 4316 bytes .../NewGroup/images/group_fulushou1.png | Bin 0 -> 4376 bytes .../NewGroup/images/group_hongzhong0.png | Bin 0 -> 4818 bytes .../NewGroup/images/group_hongzhong1.png | Bin 0 -> 4833 bytes .../NewGroup/images/group_paodekuai0.png | Bin 0 -> 4215 bytes .../NewGroup/images/group_paodekuai1.png | Bin 0 -> 4209 bytes .../assets/NewGroup/images/group_paohuzi0.png | Bin 0 -> 5487 bytes .../assets/NewGroup/images/group_paohuzi1.png | Bin 0 -> 5508 bytes .../assets/NewGroup/images/group_play0.png | Bin 0 -> 23701 bytes .../assets/NewGroup/images/group_play1.png | Bin 0 -> 20721 bytes .../assets/NewGroup/images/group_quanbu0.png | Bin 0 -> 2926 bytes .../assets/NewGroup/images/group_quanbu1.png | Bin 0 -> 2941 bytes .../assets/NewGroup/images/group_waihuzi0.png | Bin 0 -> 4646 bytes .../assets/NewGroup/images/group_waihuzi1.png | Bin 0 -> 4654 bytes fk101/wb_new_ui/assets/NewGroup/package.xml | 16 + .../Assets/ART/base/lobby/ui/Lobby_fui.bytes | Bin 61164 -> 61169 bytes .../ART/base/newgroup/ui/NewGroup_atlas0.png | Bin 1083877 -> 1197155 bytes .../base/newgroup/ui/NewGroup_atlas0_1.png | Bin 1268880 -> 1210078 bytes .../ART/base/newgroup/ui/NewGroup_fui.bytes | Bin 258650 -> 259937 bytes .../wb_unity_pro/Logs/AssetImportWorker0.log | 3287 +++++++++++++++++ 32 files changed, 4151 insertions(+), 903 deletions(-) create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_changsha0.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_changsha1.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_fulushou0.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_fulushou1.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_hongzhong0.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_hongzhong1.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_paodekuai0.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_paodekuai1.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_paohuzi0.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_paohuzi1.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_play0.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_play1.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_quanbu0.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_quanbu1.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_waihuzi0.png create mode 100644 fk101/wb_new_ui/assets/NewGroup/images/group_waihuzi1.png diff --git a/fk101/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua b/fk101/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua index e81cd348..94afc10b 100644 --- a/fk101/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua +++ b/fk101/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua @@ -777,32 +777,36 @@ 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 - if self.currentGameItemName == nil then - item.icon = 'ui://NewGroup/quyxtb-1' - item:GetChild("n11").text = "" + item.icon = 'ui://NewGroup/group_quanbu0' + -- gameName = GetGameName(0) + if self.currentGameItemName == nil or self.lst_game.selectedIndex == index then + item.icon = 'ui://NewGroup/group_quanbu1' + -- item:GetChild("n11").text = "" end else local gameId = self.gameIdList[index] local config = ExtendManager.GetExtendConfig(gameId) local mode = config:GetGameInfo() local iconName = mode:GetIconUrl1() - item.icon = iconName - gameName = GetGameName(gameId) - item:GetChild("n11").text = gameName + local last = "0" + if self.lst_game.selectedIndex == index then + last = "1" + end + printlog("lingmeng __fillGameItem", iconName .. last) + item.icon = iconName .. last + -- gameName = GetGameName(gameId) + -- item:GetChild("n11").text = gameName end - if item.icon == self.currentGameItemName then - item.icon = self.currentGameItemName .. "-1" - item:GetChild("n11").text = gameName - if (index == 0) then - item:GetChild("n11").text = "" - end - end + -- if item.icon == self.currentGameItemName then + -- item.icon = self.currentGameItemName .. "-1" + -- -- item:GetChild("n11").text = gameName + -- if (index == 0) then + -- -- item:GetChild("n11").text = "" + -- end + -- end item:GetChild("n22").text = index + 1 end diff --git a/fk101/lua_probject/extend_project/extend/majiang/changsha/EXGameInfo.lua b/fk101/lua_probject/extend_project/extend/majiang/changsha/EXGameInfo.lua index 927e50da..9c920c48 100644 --- a/fk101/lua_probject/extend_project/extend/majiang/changsha/EXGameInfo.lua +++ b/fk101/lua_probject/extend_project/extend/majiang/changsha/EXGameInfo.lua @@ -4,347 +4,332 @@ local M = EXGameInfo function EXGameInfo.new(blur_view) - setmetatable(M, {__index = IGameInfo}) - local self = setmetatable({}, {__index = M}) - self.class = "EXGameInfo" - - UIPackage.AddPackage("extend/majiang/changsha/ui/Info_MJ_ChangSha") - return self + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + + UIPackage.AddPackage("extend/majiang/changsha/ui/Info_MJ_ChangSha") + return self end function M:FillData() - self._maxPlayer = 4 -- 默认玩家人数 - self._roundChoice = 4 -- 回合选项数 - if oldGameVersion==1 then + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 4 -- 回合选项数 + if oldGameVersion == 1 then self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ChangSha/Cgm_create_room") else self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ChangSha/Cgm_create_room_yueyang") end - - if oldGameVersion==2 then - self._config:GetController("xipai").selectedIndex=0 - - self.xipaiValueText=self._config:GetChild('xipaifen') - self.xipaiValueText.text=1 - self.xipaiValue=1 - - self.anchouValueText=self._config:GetChild('anchoufen') - self.anchouValueText.text=1 - self.anchouValue=1 + + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 0 + + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 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 - - if value < 0 then - ViewUtil.ErrorTip(1,"输入数据异常!") - end - - self.xipaiValueText.text=value/1000 - self.xipaiValue=value/1000 - - end, 3, nil) - gniv:Show() - - - end - ) + 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 + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + 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 - ) - + 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 - -end +end -local _help_url= "ui://Info_MJ_ChangSha/Com_help" +local _help_url = "ui://Info_MJ_ChangSha/Com_help" function M:GetHelpUrl() - return _help_url + return _help_url end local _icon_url = "ui://Info_MJ_ChangSha/icon" function M:GetIconUrl() - return _icon_url + return _icon_url end -local _icon_url1 = "ui://Info_MJ_ChangSha/icon1" +local _icon_url1 = "ui://NewGroup/group_changsha" function M:GetIconUrl1() - return _icon_url1 + return _icon_url1 end -local _play_list ={} --{"长沙麻将","三人长沙","二人长沙"} +local _play_list = {} --{"长沙麻将","三人长沙","二人长沙"} function M:GetPlayList() - return _play_list + return _play_list end function M:SelectedConfigData() - local _config = self._config - local round = _config:GetController("round").selectedIndex + 1 --== 0 and 1 or 2 - self._maxPlayer = _config:GetController("play_list").selectedIndex+2 + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 --== 0 and 1 or 2 + self._maxPlayer = _config:GetController("play_list").selectedIndex + 2 - local zhuangxian = _config:GetChild("btn_zhuangxian").selected and true or false - -- local piaofen = _config:GetChild("btn_piaofen").selected and true or false - local zimo = _config:GetChild("btn_zimo").selected and true or false - local AA = _config:GetController("Cost").selectedIndex - -- local liuliushun = _config:GetChild("btn_liuliushun").selected and true or false - -- local queyise = _config:GetChild("btn_queyise").selected and true or false - -- local banbanhu = _config:GetChild("btn_banbanhu").selected and true or false - -- local dasixi = _config:GetChild("btn_dasixi").selected and true or false - local jiejiegao = _config:GetChild("btn_jiejiegao").selected and true or false - local santong = _config:GetChild("btn_santong").selected and true or false - local yizhihua = _config:GetChild("btn_yizhihua").selected and true or false - local zhongtusixi = _config:GetChild("btn_zhongtusixi").selected and true or false - local zhongtuliuliushun = _config:GetChild("btn_zhongtuliuliushun").selected and true or false + local zhuangxian = _config:GetChild("btn_zhuangxian").selected and true or false + -- local piaofen = _config:GetChild("btn_piaofen").selected and true or false + local zimo = _config:GetChild("btn_zimo").selected and true or false + local AA = _config:GetController("Cost").selectedIndex + -- local liuliushun = _config:GetChild("btn_liuliushun").selected and true or false + -- local queyise = _config:GetChild("btn_queyise").selected and true or false + -- local banbanhu = _config:GetChild("btn_banbanhu").selected and true or false + -- local dasixi = _config:GetChild("btn_dasixi").selected and true or false + local jiejiegao = _config:GetChild("btn_jiejiegao").selected and true or false + local santong = _config:GetChild("btn_santong").selected and true or false + local yizhihua = _config:GetChild("btn_yizhihua").selected and true or false + local zhongtusixi = _config:GetChild("btn_zhongtusixi").selected and true or false + local zhongtuliuliushun = _config:GetChild("btn_zhongtuliuliushun").selected and true or false - local niao_type = _config:GetController("niao").selectedIndex - local niao_num = _config:GetController("niao_num").selectedIndex - local niao_db_num = _config:GetController("niao_db_num").selectedIndex - local niao = niao_type == 1 and (niao_db_num == 0 and 1 or 2) or (niao_type == 0 and (niao_num == 0 and 2 or (niao_num == 1 and 4 or 6)) or 2) - local piao_niao = _config:GetChild("btn_piao_niao").selected - local two_pair = _config:GetChild("btn_two_pair").selected - local no_jiang = _config:GetChild("btn_no_jiang").selected - local four_win = _config:GetChild("btn_four_win").selected - local native_hu = _config:GetChild("btn_native_hu").selected - local queyimen = _config:GetChild("btn_queyimen").selected - local fengding = _config:GetChild("btn_fengding").selected - local banyiquan = _config:GetChild("btn_banyiquan").selected - local menqing = _config:GetChild("btn_menqing").selected - - local fengding_score=0 - if _config:GetController("fengding") then - fengding_score=_config:GetController("fengding").selectedIndex - end - - local piao_niao1=0 + local niao_type = _config:GetController("niao").selectedIndex + local niao_num = _config:GetController("niao_num").selectedIndex + local niao_db_num = _config:GetController("niao_db_num").selectedIndex + local niao = niao_type == 1 and (niao_db_num == 0 and 1 or 2) or + (niao_type == 0 and (niao_num == 0 and 2 or (niao_num == 1 and 4 or 6)) or 2) + local piao_niao = _config:GetChild("btn_piao_niao").selected + local two_pair = _config:GetChild("btn_two_pair").selected + local no_jiang = _config:GetChild("btn_no_jiang").selected + local four_win = _config:GetChild("btn_four_win").selected + local native_hu = _config:GetChild("btn_native_hu").selected + local queyimen = _config:GetChild("btn_queyimen").selected + local fengding = _config:GetChild("btn_fengding").selected + local banyiquan = _config:GetChild("btn_banyiquan").selected + local menqing = _config:GetChild("btn_menqing").selected + + local fengding_score = 0 + if _config:GetController("fengding") then + fengding_score = _config:GetController("fengding").selectedIndex + end + + local piao_niao1 = 0 if _config:GetController('piao') then - piao_niao1=_config:GetController('piao').selectedIndex - end - local piao1=false - local piao2=false - local piao3=false - local piao_niao_opt=0 - if piao_niao1==2 then - piao_niao_opt=_config:GetController("piaofen").selectedIndex + piao_niao1 = _config:GetController('piao').selectedIndex end - - local xi_pai=false - local xi_paifen=0 + local piao1 = false + local piao2 = false + local piao3 = false + local piao_niao_opt = 0 + if piao_niao1 == 2 then + piao_niao_opt = _config:GetController("piaofen").selectedIndex + end + + local xi_pai = false + local xi_paifen = 0 if _config:GetChild("xipai") then - xi_pai=_config:GetChild("xipai").selected + xi_pai = _config:GetChild("xipai").selected end - - local niaofen_opt=0 - local niaofen_score=1 - local difen_score=1 - local kai_gong=0 - if oldGameVersion==2 then - niaofen_opt=_config:GetController("niaoadd").selectedIndex - niaofen_score= tonumber(_config:GetController("niaodf").selectedPage) - difen_score= tonumber(_config:GetController("jcdifen").selectedPage) - kai_gong=_config:GetController("kaigang").selectedIndex + + local niaofen_opt = 0 + local niaofen_score = 1 + local difen_score = 1 + local kai_gong = 0 + if oldGameVersion == 2 then + niaofen_opt = _config:GetController("niaoadd").selectedIndex + niaofen_score = tonumber(_config:GetController("niaodf").selectedPage) + difen_score = tonumber(_config:GetController("jcdifen").selectedPage) + kai_gong = _config:GetController("kaigang").selectedIndex end - ---------- - local _data = {} - _data["opt"] = round - _data["maxPlayers"] = self._maxPlayer - _data["zhuangxian"] = zhuangxian - _data["zimo"] = zimo - _data["AA"] = AA - -- _data["piaofen"] = piaofen - -- _data["liuliushun"] = liuliushun - -- _data["queyise"] = queyise - -- _data["banbanhu"] = banbanhu - -- _data["dasixi"] = dasixi - _data["jiejiegao"] = jiejiegao - _data["santong"] = santong - _data["yizhihua"] = yizhihua - _data["zhongtusixi"] = zhongtusixi - _data["zhongtuliuliushun"] = zhongtuliuliushun + --------- + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = self._maxPlayer - _data["niao_type"] = niao_type - - - if oldGameVersion==1 then + _data["zhuangxian"] = zhuangxian + _data["zimo"] = zimo + _data["AA"] = AA + -- _data["piaofen"] = piaofen + -- _data["liuliushun"] = liuliushun + -- _data["queyise"] = queyise + -- _data["banbanhu"] = banbanhu + -- _data["dasixi"] = dasixi + _data["jiejiegao"] = jiejiegao + _data["santong"] = santong + _data["yizhihua"] = yizhihua + _data["zhongtusixi"] = zhongtusixi + _data["zhongtuliuliushun"] = zhongtuliuliushun + + _data["niao_type"] = niao_type + + + if oldGameVersion == 1 then _data["niao"] = niao else _data["niao"] = tonumber(_config:GetController("niao_num").selectedPage) end - - - if oldGameVersion==1 then + + + if oldGameVersion == 1 then _data["piao_niao"] = piao_niao else _data["piao_niao"] = piao_niao1 end - _data["two_pair"] = two_pair - _data["no_jiang"] = no_jiang - _data["four_win"] = four_win - _data["native_hu"] = native_hu - _data["queyimen"] = queyimen - _data["fengding"] = fengding - _data["banyiquan"] = banyiquan - _data["menqing"] = menqing + _data["two_pair"] = two_pair + _data["no_jiang"] = no_jiang + _data["four_win"] = four_win + _data["native_hu"] = native_hu + _data["queyimen"] = queyimen + _data["fengding"] = fengding + _data["banyiquan"] = banyiquan + _data["menqing"] = menqing _data["fengding_score"] = fengding_score --_data['piao'] = piao _data['piao1'] = piao1 _data['piao2'] = piao2 _data['piao3'] = piao3 - - auto_piao=false - if piao_niao1==2 then + + auto_piao = false + if piao_niao1 == 2 then if piao1 or piao2 or piao3 then - auto_piao=true + auto_piao = true end end - - if oldGameVersion==2 then + + if oldGameVersion == 2 then _data['auto_piao'] = auto_piao end - + _data['xi_pai'] = xi_pai _data['piao_niao_opt'] = piao_niao_opt - - local xi_pai_score=0 - local an_chou_score=0 - if oldGameVersion==2 then - xi_pai_score=self.xipaiValue - an_chou_score=self.anchouValue + + local xi_pai_score = 0 + local an_chou_score = 0 + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue end - - _data['xi_pai_score'] = xi_pai_score*1000 - _data['an_chou_score'] = an_chou_score*1000 - - if oldGameVersion==2 then + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + if oldGameVersion == 2 then _data['niaofen_opt'] = niaofen_opt _data['niaofen_score'] = niaofen_score _data['difen_score'] = difen_score _data['kai_gong'] = kai_gong - end - + pt(_data) - return _data -end - - + return _data +end function M:LoadConfigData(data) pt(data) - local _config = self._config - _config:GetController("round").selectedIndex = data.opt - 1 -- == 1 and 0 or 1 - _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 -- == 1 and 0 or 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 - _config:GetChild("btn_zhuangxian").selected = data.zhuangxian - _config:GetChild("btn_zimo").selected = data.zimo - _config:GetController("Cost").selectedIndex = data.AA - -- _config:GetChild("btn_piaofen").selected = data.piaofen - -- _config:GetChild("btn_liuliushun").selected = data.liuliushun - -- _config:GetChild("btn_queyise").selected = data.queyise - -- _config:GetChild("btn_banbanhu").selected = data.banbanhu - -- _config:GetChild("btn_dasixi").selected = data.dasixi - _config:GetChild("btn_jiejiegao").selected = data.jiejiegao - _config:GetChild("btn_santong").selected = data.santong - _config:GetChild("btn_yizhihua").selected = data.yizhihua - _config:GetChild("btn_zhongtusixi").selected = data.zhongtusixi - _config:GetChild("btn_zhongtuliuliushun").selected = data.zhongtuliuliushun + _config:GetChild("btn_zhuangxian").selected = data.zhuangxian + _config:GetChild("btn_zimo").selected = data.zimo + _config:GetController("Cost").selectedIndex = data.AA + -- _config:GetChild("btn_piaofen").selected = data.piaofen + -- _config:GetChild("btn_liuliushun").selected = data.liuliushun + -- _config:GetChild("btn_queyise").selected = data.queyise + -- _config:GetChild("btn_banbanhu").selected = data.banbanhu + -- _config:GetChild("btn_dasixi").selected = data.dasixi + _config:GetChild("btn_jiejiegao").selected = data.jiejiegao + _config:GetChild("btn_santong").selected = data.santong + _config:GetChild("btn_yizhihua").selected = data.yizhihua + _config:GetChild("btn_zhongtusixi").selected = data.zhongtusixi + _config:GetChild("btn_zhongtuliuliushun").selected = data.zhongtuliuliushun - _config:GetController("niao").selectedIndex = data.niao_type - - if oldGameVersion==1 then - _config:GetController("niao_num").selectedIndex = data.niao_type ~= 0 and 0 or (data.niao == 4 and 1 or (data.niao == 6 and 2 or 0)) + _config:GetController("niao").selectedIndex = data.niao_type + + if oldGameVersion == 1 then + _config:GetController("niao_num").selectedIndex = data.niao_type ~= 0 and 0 or + (data.niao == 4 and 1 or (data.niao == 6 and 2 or 0)) else - _config:GetController("niao_num").selectedIndex=data.niao/2-1 + _config:GetController("niao_num").selectedIndex = data.niao / 2 - 1 end - _config:GetController("niao_db_num").selectedIndex = data.niao_type ~= 1 and 0 or (data.niao == 1 and 0 or 1) - if oldGameVersion==1 then + _config:GetController("niao_db_num").selectedIndex = data.niao_type ~= 1 and 0 or (data.niao == 1 and 0 or 1) + if oldGameVersion == 1 then _config:GetChild("btn_piao_niao").selected = data.piao_niao end - _config:GetChild("btn_two_pair").selected = data.two_pair - _config:GetChild("btn_no_jiang").selected = data.no_jiang - _config:GetChild("btn_four_win").selected = data.four_win - _config:GetChild("btn_native_hu").selected = data.native_hu - _config:GetChild("btn_queyimen").selected = data.queyimen - _config:GetChild("btn_fengding").selected = data.fengding or false - _config:GetChild("btn_banyiquan").selected = data.banyiquan or false - _config:GetChild("btn_menqing").selected = data.menqing or false - - if _config:GetController("fengding") then - _config:GetController("fengding").selectedIndex=data.fengding_score - end - - if _config:GetController("piao") then - _config:GetController("piao").selectedIndex=data.piao_niao - _config:GetChild('pf1').selected=data.piao1 - _config:GetChild('pf2').selected=data.piao2 - _config:GetChild('pf3').selected=data.piao3 - end - - if _config:GetChild("xipai") then - _config:GetChild("xipai").selected=data.xi_pai - end - - if _config:GetController("piaofen") then - _config:GetController("piaofen").selectedIndex=data.piao_niao_opt - end - - if oldGameVersion==2 then - self.xipaiValueText.text=data.xi_pai_score/1000 - self.xipaiValue=data.xi_pai_score/1000 + _config:GetChild("btn_two_pair").selected = data.two_pair + _config:GetChild("btn_no_jiang").selected = data.no_jiang + _config:GetChild("btn_four_win").selected = data.four_win + _config:GetChild("btn_native_hu").selected = data.native_hu + _config:GetChild("btn_queyimen").selected = data.queyimen + _config:GetChild("btn_fengding").selected = data.fengding or false + _config:GetChild("btn_banyiquan").selected = data.banyiquan or false + _config:GetChild("btn_menqing").selected = data.menqing or false - self.anchouValueText.text=data.an_chou_score/1000 - self.anchouValue=data.an_chou_score/1000 + if _config:GetController("fengding") then + _config:GetController("fengding").selectedIndex = data.fengding_score end - - if oldGameVersion==2 then - _config:GetController("niaoadd").selectedIndex=data.niaofen_opt or 0 - _config:GetController("niaodf").selectedIndex=data.niaofen_score-1 - _config:GetController("jcdifen").selectedIndex=data.difen_score-1 - _config:GetController("kaigang").selectedIndex=data.kai_gong + + if _config:GetController("piao") then + _config:GetController("piao").selectedIndex = data.piao_niao + _config:GetChild('pf1').selected = data.piao1 + _config:GetChild('pf2').selected = data.piao2 + _config:GetChild('pf3').selected = data.piao3 end - - end - -return M - \ No newline at end of file + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + if _config:GetController("piaofen") then + _config:GetController("piaofen").selectedIndex = data.piao_niao_opt + end + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 + end + + if oldGameVersion == 2 then + _config:GetController("niaoadd").selectedIndex = data.niaofen_opt or 0 + _config:GetController("niaodf").selectedIndex = data.niaofen_score - 1 + _config:GetController("jcdifen").selectedIndex = data.difen_score - 1 + _config:GetController("kaigang").selectedIndex = data.kai_gong + end +end + +return M diff --git a/fk101/lua_probject/extend_project/extend/majiang/hongzhong/EXGameInfo.lua b/fk101/lua_probject/extend_project/extend/majiang/hongzhong/EXGameInfo.lua index 2ee052c4..30393a59 100644 --- a/fk101/lua_probject/extend_project/extend/majiang/hongzhong/EXGameInfo.lua +++ b/fk101/lua_probject/extend_project/extend/majiang/hongzhong/EXGameInfo.lua @@ -3,59 +3,54 @@ local EXGameInfo = {} local M = EXGameInfo function EXGameInfo.new(blur_view) - setmetatable(M, {__index = IGameInfo}) - local self = setmetatable({}, {__index = M}) - self.class = "EXGameInfo" - UIPackage.AddPackage("extend/majiang/hongzhong/ui/Info_MJ_HongZhong") - return self + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/hongzhong/ui/Info_MJ_HongZhong") + return self end function M:FillData() - self._maxPlayer = 4 -- 默认玩家人数 - self._roundChoice = 4 -- 回合选项数 - - if oldGameVersion==1 then + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 4 -- 回合选项数 + + if oldGameVersion == 1 then self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_HongZhong/Cgm_create_room") else self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_HongZhong/Cgm_create_room_yueyang") end - - if oldGameVersion==2 then - self._config:GetController("xipai").selectedIndex=0 - - self.xipaiValueText=self._config:GetChild('xipaifen') - self.xipaiValue=1 - self.anchouValueText=self._config:GetChild('anchoufen') - self.anchouValueText.text=1 - self.anchouValue=1 - + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 0 + + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 + local btn_cr = self._config:GetChild('sdsrbtn') btn_cr.onClick:Set( function() - - local gniv = GroupNumberInputView_Game.new(nil, function(num) - + local gniv = GroupNumberInputView_Game.new(nil, function(num) local value = limit if otype == 1 then value = value + ad2d(num) - elseif otype == - 1 then + elseif otype == -1 then value = value - ad2d(num) else value = ad2d(num) end - + if value < 0 then - ViewUtil.ErrorTip(1,"输入数据异常!") + ViewUtil.ErrorTip(1, "输入数据异常!") end - - self.xipaiValueText.text=value/1000 - self.xipaiValue=value/1000 - + + self.xipaiValueText.text = value / 1000 + self.xipaiValue = value / 1000 end, 3, nil) gniv:Show() - - end ) @@ -64,146 +59,139 @@ function M:FillData() local btn_cr2 = self._config:GetChild('anchoubtn') btn_cr2.onClick:Set( function() - - local gniv = GroupNumberInputView_Game.new(nil, function(num) - + local gniv = GroupNumberInputView_Game.new(nil, function(num) local value = limit if otype == 1 then value = value + ad2d(num) - elseif otype == - 1 then + elseif otype == -1 then value = value - ad2d(num) else value = ad2d(num) end - + if value < 0 then - ViewUtil.ErrorTip(1,"输入数据异常!") + ViewUtil.ErrorTip(1, "输入数据异常!") end - - self.anchouValueText.text=value/1000 - self.anchouValue=value/1000 - + + self.anchouValueText.text = value / 1000 + self.anchouValue = value / 1000 end, 3, nil) gniv:Show() - - end ) - end - -end +end -local _help_url= "ui://Info_MJ_HongZhong/Com_help" +local _help_url = "ui://Info_MJ_HongZhong/Com_help" function M:GetHelpUrl() - return _help_url + return _help_url end local _icon_url = "ui://Info_MJ_HongZhong/icon" function M:GetIconUrl() - return _icon_url + return _icon_url end -local _icon_url1 = "ui://Info_MJ_HongZhong/icon1" +local _icon_url1 = "ui://NewGroup/group_hongzhong" function M:GetIconUrl1() - return _icon_url1 + return _icon_url1 end -local _play_list = {}--{"红中麻将","三人红中","二人红中"} +local _play_list = {} --{"红中麻将","三人红中","二人红中"} function M:GetPlayList() - return _play_list + return _play_list end function M:SelectedConfigData() - local _config = self._config - local round = _config:GetController("round").selectedIndex + 1 - local people = _config:GetController("play_list").selectedIndex+2 - local qiangkong = _config:GetChild("btn_qgh").selected and true or false - local qiangkong_niao = _config:GetChild("btn_qghjm").selected and true or false - local seven_pair = _config:GetChild("btn_qidui").selected and true or false - local niao_type = _config:GetController("NiaoType").selectedIndex + 1 - local zha_ma = _config:GetController("zha").selectedIndex + 1 - local wo_niao = _config:GetController("wowoniao").selectedIndex + 1 - local laizi = _config:GetChild("btn_laizi").selected and true or false - local aa = _config:GetController("Cost").selectedIndex - -- local zhuangxian = _config:GetChild("btn_zhuangxian").selected and true or false - local piao_niao = _config:GetChild("btn_piao_niao").selected - local jiangma = _config:GetController("jiangma").selectedIndex + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex + 2 + local qiangkong = _config:GetChild("btn_qgh").selected and true or false + local qiangkong_niao = _config:GetChild("btn_qghjm").selected and true or false + local seven_pair = _config:GetChild("btn_qidui").selected and true or false + local niao_type = _config:GetController("NiaoType").selectedIndex + 1 + local zha_ma = _config:GetController("zha").selectedIndex + 1 + local wo_niao = _config:GetController("wowoniao").selectedIndex + 1 + local laizi = _config:GetChild("btn_laizi").selected and true or false + local aa = _config:GetController("Cost").selectedIndex + -- local zhuangxian = _config:GetChild("btn_zhuangxian").selected and true or false + local piao_niao = _config:GetChild("btn_piao_niao").selected + local jiangma = _config:GetController("jiangma").selectedIndex local wuguizhuopaojiabei = _config:GetChild("btn_wuhongzhongzuobaofanbei").selected - + ---------- - local piao_niao1=0 + local piao_niao1 = 0 if _config:GetController('piao') then - piao_niao1=_config:GetController('piao').selectedIndex - end - local piao1=false - local piao2=false - local piao3=false - local piao_niao_opt=0 - if piao_niao1==2 then - piao_niao_opt=_config:GetController("piaofen").selectedIndex + piao_niao1 = _config:GetController('piao').selectedIndex end - - + local piao1 = false + local piao2 = false + local piao3 = false + local piao_niao_opt = 0 + if piao_niao1 == 2 then + piao_niao_opt = _config:GetController("piaofen").selectedIndex + end + + local laizi4_hu = false if _config:GetChild("btn_sihongzhong") then laizi4_hu = _config:GetChild("btn_sihongzhong").selected end - - local hz_hu =false + + local hz_hu = false if _config:GetChild("btn_wuhongzhong") then hz_hu = _config:GetChild("btn_wuhongzhong").selected end - - local wuguijiabei =false + + local wuguijiabei = false if _config:GetChild("btn_wuhongzhongzimo") then wuguijiabei = _config:GetChild("btn_wuhongzhongzimo").selected end - - local di_fen=false + + local di_fen = false if _config:GetController('difen') then - di_fen=_config:GetController('difen').selectedIndex + di_fen = _config:GetController('difen').selectedIndex end - - local xi_pai=false + + local xi_pai = false if _config:GetChild("xipai") then - xi_pai=_config:GetChild("xipai").selected + xi_pai = _config:GetChild("xipai").selected + end + + local fengding_score = 0 + if _config:GetController("fengding") then + fengding_score = _config:GetController("fengding").selectedIndex end - - local fengding_score=0 - if _config:GetController("fengding") then - fengding_score=_config:GetController("fengding").selectedIndex - end ---------- - local _data = {} - _data["opt"] = round - _data["maxPlayers"] = people - -- _data["maxPlayers"] = 2 - -- _data["zhuangxian"] = zhuangxian - _data["qidui"] = seven_pair - _data["qiangkong"] = qiangkong - _data["qiangkong_niao"] = not qiangkong and false or qiangkong_niao - _data["niao"] = niao_type - if oldGameVersion==1 then + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + -- _data["maxPlayers"] = 2 + -- _data["zhuangxian"] = zhuangxian + _data["qidui"] = seven_pair + _data["qiangkong"] = qiangkong + _data["qiangkong_niao"] = not qiangkong and false or qiangkong_niao + _data["niao"] = niao_type + if oldGameVersion == 1 then _data["niao_opt"] = niao_type == 2 and 1 or (niao_type == 3 and wo_niao or zha_ma) else _data["niao_opt"] = niao_type == 2 and 1 or (niao_type == 3 and wo_niao or zha_ma) end - + _data["niao_opt_score"] = wo_niao - - - _data["laizi8"] = laizi - _data["AA"] = aa - if oldGameVersion==1 then + + + _data["laizi8"] = laizi + _data["AA"] = aa + if oldGameVersion == 1 then _data["piao_niao"] = piao_niao else _data["piao_niao"] = piao_niao1 end - - _data["jiangma"] = jiangma - + + _data["jiangma"] = jiangma + _data['piao1'] = piao1 _data['piao2'] = piao2 _data['piao3'] = piao3 @@ -212,97 +200,95 @@ function M:SelectedConfigData() _data['wuguijiabei'] = wuguijiabei _data['di_fen'] = di_fen _data['xi_pai'] = xi_pai - - auto_piao=false - if piao_niao==2 then + + auto_piao = false + if piao_niao == 2 then if piao1 or piao2 or piao3 then - auto_piao=true + auto_piao = true end end _data['auto_piao'] = auto_piao _data['piao_niao_opt'] = piao_niao_opt - - local xi_pai_score=0 - local an_chou_score=0 - if oldGameVersion==2 then - xi_pai_score=self.xipaiValue - an_chou_score=self.anchouValue + + local xi_pai_score = 0 + local an_chou_score = 0 + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue end - - _data['xi_pai_score'] = xi_pai_score*1000 - _data['an_chou_score'] = an_chou_score*1000 - + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + _data["fengding_score"] = fengding_score _data["wuguizhuopaojiabei"] = wuguizhuopaojiabei - - return _data -end + + return _data +end function M:LoadConfigData(data) - local _config = self._config - _config:GetController("round").selectedIndex = data.opt-1 - _config:GetController("play_list").selectedIndex = data.maxPlayers-2 - _config:GetChild("btn_qgh").selected = data.qiangkong - _config:GetChild("btn_qghjm").selected = data.qiangkong_niao - _config:GetChild("btn_qidui").selected = data.qidui - -- _config:GetChild("btn_zhuangxian").selected = data.zhuangxian - _config:GetController("NiaoType").selectedIndex = data.niao - 1 - if data.niao == 1 then - _config:GetController("zha").selectedIndex = data.niao_opt - 1 - elseif data.niao == 3 then - _config:GetController("wowoniao").selectedIndex = data.niao_opt - 1 - end + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 + _config:GetChild("btn_qgh").selected = data.qiangkong + _config:GetChild("btn_qghjm").selected = data.qiangkong_niao + _config:GetChild("btn_qidui").selected = data.qidui + -- _config:GetChild("btn_zhuangxian").selected = data.zhuangxian + _config:GetController("NiaoType").selectedIndex = data.niao - 1 + if data.niao == 1 then + _config:GetController("zha").selectedIndex = data.niao_opt - 1 + elseif data.niao == 3 then + _config:GetController("wowoniao").selectedIndex = data.niao_opt - 1 + end _config:GetController("wowoniao").selectedIndex = data.niao_opt_score - 1 - - _config:GetChild("btn_laizi").selected = data.laizi8 - _config:GetController("Cost").selectedIndex = data.AA or 0 - if oldGameVersion==1 then + + _config:GetChild("btn_laizi").selected = data.laizi8 + _config:GetController("Cost").selectedIndex = data.AA or 0 + if oldGameVersion == 1 then _config:GetChild("btn_piao_niao").selected = data.piao_niao end - _config:GetController("jiangma").selectedIndex = data.jiangma - - - if _config:GetController("piao") then - _config:GetController("piao").selectedIndex=data.piao_niao - _config:GetChild('pf1').selected=data.piao1 - _config:GetChild('pf2').selected=data.piao2 - _config:GetChild('pf3').selected=data.piao3 - end - - if _config:GetChild("btn_sihongzhong") then - _config:GetChild("btn_sihongzhong").selected=data.laizi4_hu - _config:GetChild("btn_wuhongzhong").selected=data.hz_hu - _config:GetChild("btn_wuhongzhongzimo").selected=data.wuguijiabei - end - - if _config:GetController("difen") then - _config:GetController("difen").selectedIndex=data.di_fen - end - - if _config:GetChild("xipai") then - _config:GetChild("xipai").selected=data.xi_pai - end - - if _config:GetController("piaofen") then - _config:GetController("piaofen").selectedIndex=data.piao_niao_opt - end - - if oldGameVersion==2 then - self.xipaiValueText.text=data.xi_pai_score/1000 - self.xipaiValue=data.xi_pai_score/1000 + _config:GetController("jiangma").selectedIndex = data.jiangma - self.anchouValueText.text=data.an_chou_score/1000 - self.anchouValue=data.an_chou_score/1000 + + if _config:GetController("piao") then + _config:GetController("piao").selectedIndex = data.piao_niao + _config:GetChild('pf1').selected = data.piao1 + _config:GetChild('pf2').selected = data.piao2 + _config:GetChild('pf3').selected = data.piao3 end - - if _config:GetController("fengding") then - _config:GetController("fengding").selectedIndex=data.fengding_score + + if _config:GetChild("btn_sihongzhong") then + _config:GetChild("btn_sihongzhong").selected = data.laizi4_hu + _config:GetChild("btn_wuhongzhong").selected = data.hz_hu + _config:GetChild("btn_wuhongzhongzimo").selected = data.wuguijiabei end - - _config:GetChild("btn_wuhongzhongzuobaofanbei").selected=data.wuguizhuopaojiabei - - end - -return M - \ No newline at end of file + + if _config:GetController("difen") then + _config:GetController("difen").selectedIndex = data.di_fen + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + if _config:GetController("piaofen") then + _config:GetController("piaofen").selectedIndex = data.piao_niao_opt + end + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 + end + + if _config:GetController("fengding") then + _config:GetController("fengding").selectedIndex = data.fengding_score + end + + _config:GetChild("btn_wuhongzhongzuobaofanbei").selected = data.wuguizhuopaojiabei +end + +return M diff --git a/fk101/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameInfo.lua b/fk101/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameInfo.lua index f9256127..0229149a 100644 --- a/fk101/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameInfo.lua +++ b/fk101/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameInfo.lua @@ -3,8 +3,8 @@ local EXGameInfo = {} local M = EXGameInfo function EXGameInfo.new(blur_view) - setmetatable(M, {__index = IGameInfo}) - local self = setmetatable({}, {__index = M}) + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) self.class = 'EXGameInfo' UIPackage.AddPackage('extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ') UIPackage.AddPackage('extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ') @@ -12,93 +12,83 @@ function EXGameInfo.new(blur_view) end function M:FillData() - self._maxPlayer = 3 -- 默认玩家人数 + self._maxPlayer = 3 -- 默认玩家人数 self._roundChoice = 3 -- 回合选项数 self._config = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ChangdeWHZ/Cgm_create_room') - - if oldGameVersion ==1 then - self._config:GetChild("xipai").visible=false - end - if oldGameVersion==2 then - self._config:GetController("xipai").selectedIndex=1 - self.xipaiValueText=self._config:GetChild('xipaifen') - self.xipaiValueText.text=1 - self.xipaiValue=1 + if oldGameVersion == 1 then + self._config:GetChild("xipai").visible = false + end - self.anchouValueText=self._config:GetChild('anchoufen') - self.anchouValueText.text=1 - self.anchouValue=1 - - 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 - - if value < 0 then - ViewUtil.ErrorTip(1,"输入数据异常!") - end - - self.xipaiValueText.text=value/1000 - self.xipaiValue=value/1000 - - end, 3, nil) - gniv:Show() - - + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 1 + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 + + 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 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() - - + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") end - ) - end - - + + 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 btn_jia = self._config:GetChild('btn_jia') local btn_jian = self._config:GetChild('btn_jian') local btn_jia1 = self._config:GetChild('btn_jia1') local btn_jian1 = self._config:GetChild('btn_jian1') local btn_jia2 = self._config:GetChild('btn_jia2') local btn_jian2 = self._config:GetChild('btn_jian2') - -- local fS=self._config:GetChild('btn_round8'):GetChild("title") - -- fS.text="1局" - -- fS=self._config:GetChild('btn_round16'):GetChild("title") - -- fS.text="8局" + -- local fS=self._config:GetChild('btn_round8'):GetChild("title") + -- fS.text="1局" + -- fS=self._config:GetChild('btn_round16'):GetChild("title") + -- fS.text="8局" btn_jia.onClick:Set( function() if self._config:GetController('tun').selectedIndex ~= 5 then @@ -191,6 +181,7 @@ function M:FillData() end ) end + local _help_url = 'ui://Info_Poker_ChangdeWHZ/Com_help' function M:GetHelpUrl() return _help_url @@ -201,12 +192,12 @@ function M:GetIconUrl() return _icon_url end -local _icon_url1 = "ui://Info_Poker_ChangdeWHZ/icon1" +local _icon_url1 = "ui://NewGroup/group_paohuzi" function M:GetIconUrl1() return _icon_url1 end -local _play_list = {"全名堂","红黑点","多红多番"} +local _play_list = { "全名堂", "红黑点", "多红多番" } function M:GetPlayList() return _play_list end @@ -214,7 +205,7 @@ end function M:SelectedConfigData() local _config = self._config local wanfa_C = _config:GetController('btn_Controller').selectedIndex - local round = _config:GetController('round').selectedIndex+1 --== 0 and 1 or 2 + local round = _config:GetController('round').selectedIndex + 1 --== 0 and 1 or 2 local Cost = _config:GetController('Cost').selectedIndex local tun = _config:GetController('tun').selectedIndex local fengding = _config:GetController('fengding').selectedIndex @@ -232,30 +223,30 @@ function M:SelectedConfigData() local dihu = _config:GetController('dihu').selectedIndex local haihu = _config:GetController('haihu').selectedIndex local renshu = _config:GetController('renshu').selectedIndex == 0 and 2 or 3 - -- local qupai = _config:GetController('qupai').selectedIndex == 1 and true or false + -- local qupai = _config:GetController('qupai').selectedIndex == 1 and true or false local _data = {} - _data['opt'] = round -- 1 2 8局 16 局 + _data['opt'] = round -- 1 2 8局 16 局 _data['mode'] = wanfa_C + 1 -- 1 全名堂 2 红黑点 3 多红多番 _data['AA'] = Cost _data['maxPlayers'] = renshu if wanfa_C == 0 then - _data['tun'] = tun -- 充囤 0 1 2 3 4 分别是 1 2 3 4 5 - _data['fengding'] = fengding -- 封顶 0 1 2 全名堂分别是 不封顶 100封顶 200封顶 - _data['tuanyuan'] = tuanyuan -- 大团圆 0 不选 1 选 - _data['hanghangxi'] = hanghangxi -- 行行息 0 不选 1 选 - _data['shuahou'] = shuahou -- 耍猴 0 不选 1 选 - _data['huangfan'] = huangfan -- 黄番 0 不选 1 选 + _data['tun'] = tun -- 充囤 0 1 2 3 4 分别是 1 2 3 4 5 + _data['fengding'] = fengding -- 封顶 0 1 2 全名堂分别是 不封顶 100封顶 200封顶 + _data['tuanyuan'] = tuanyuan -- 大团圆 0 不选 1 选 + _data['hanghangxi'] = hanghangxi -- 行行息 0 不选 1 选 + _data['shuahou'] = shuahou -- 耍猴 0 不选 1 选 + _data['huangfan'] = huangfan -- 黄番 0 不选 1 选 _data['jiaxingxing'] = jiaxingxing -- 假行行 0 不选 1 选 - _data['tinghu'] = tinghu -- 听胡 0 不选 1 选 - _data['siqi'] = siqi -- 四七红 0 不选 1 选 - _data['back'] = back -- 四七红 0 不选 1 选 - _data['yuan'] = yuan -- 四七红 0 不选 1 选 + _data['tinghu'] = tinghu -- 听胡 0 不选 1 选 + _data['siqi'] = siqi -- 四七红 0 不选 1 选 + _data['back'] = back -- 四七红 0 不选 1 选 + _data['yuan'] = yuan -- 四七红 0 不选 1 选 elseif wanfa_C == 1 then - _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 - _data['fengding'] = fengding -- 封顶 0 1 2 红黑点分别是 不封顶 单局20封顶 单局 40封顶 - _data['duizifu'] = duizifu -- 对子胡 0 不选 1 选 + _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 + _data['fengding'] = fengding -- 封顶 0 1 2 红黑点分别是 不封顶 单局20封顶 单局 40封顶 + _data['duizifu'] = duizifu -- 对子胡 0 不选 1 选 elseif wanfa_C == 2 then - _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 + _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 _data['tianhu'] = tianhu _data['dihu'] = dihu _data['haihu'] = haihu @@ -266,28 +257,28 @@ function M:SelectedConfigData() if renshu == 2 then _data['qupai'] = false end - - local xi_pai=false - if oldGameVersion ==2 then - if _config:GetChild("xipai") then - xi_pai = _config:GetChild("xipai").selected - end - end - _data['xi_pai'] = xi_pai + local xi_pai = false + if oldGameVersion == 2 then + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + end - local xi_pai_score=0 - local an_chou_score=0 + _data['xi_pai'] = xi_pai - if oldGameVersion==2 then - xi_pai_score=self.xipaiValue - an_chou_score=self.anchouValue - end - - _data['xi_pai_score'] = xi_pai_score*1000 - _data['an_chou_score'] = an_chou_score*1000 + local xi_pai_score = 0 + local an_chou_score = 0 - _data['xi_pai'] = xi_pai + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + _data['xi_pai'] = xi_pai return _data end @@ -325,21 +316,21 @@ function M:LoadConfigData(data) if data.maxPlayers == 2 then --_config:GetController('qupai').selectedIndex = data.qupai == true and 1 or 0 end - - if _config:GetChild("xipai") then - _config:GetChild("xipai").selected=data.xi_pai - end - - if oldGameVersion==2 then - self.xipaiValueText.text=data.xi_pai_score/1000 - self.xipaiValue=data.xi_pai_score/1000 + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end - self.anchouValueText.text=data.an_chou_score/1000 - self.anchouValue=data.an_chou_score/1000 - end - + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 + end end + function M:OnChangeOption(ctype) IGameInfo.OnChangeOption(self, ctype) local people = self._config:GetController('renshu') @@ -350,4 +341,5 @@ function M:OnChangeOption(ctype) end ) end + return M diff --git a/fk101/lua_probject/extend_project/extend/zipai/fulushou/EXGameInfo.lua b/fk101/lua_probject/extend_project/extend/zipai/fulushou/EXGameInfo.lua index 8a7e3e96..e32eab34 100644 --- a/fk101/lua_probject/extend_project/extend/zipai/fulushou/EXGameInfo.lua +++ b/fk101/lua_probject/extend_project/extend/zipai/fulushou/EXGameInfo.lua @@ -3,144 +3,133 @@ local EXGameInfo = {} local M = EXGameInfo function EXGameInfo.new(blur_view) - setmetatable(M, {__index = IGameInfo}) - local self = setmetatable({}, {__index = M}) - self.class = 'EXGameInfo' - UIPackage.AddPackage('extend/zipai/fulushou/ui/Info_Poker_FuLuShou') - return self + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = 'EXGameInfo' + UIPackage.AddPackage('extend/zipai/fulushou/ui/Info_Poker_FuLuShou') + return self end function M:FillData() printlog("jefe fulushou") - self._maxPlayer = 3 -- 默认玩家人数 - self._roundChoice = 2 -- 回合选项数 - self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_FuLuShou/Cgm_create_room') - if oldGameVersion ==1 then - self._config:GetController("xipai").selectedIndex=0 + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 2 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_FuLuShou/Cgm_create_room') + if oldGameVersion == 1 then + self._config:GetController("xipai").selectedIndex = 0 end - - if oldGameVersion==2 then - self._config:GetController("xipai").selectedIndex=1 - - self.xipaiValueText=self._config:GetChild('xipaifen') - self.xipaiValueText.text=1 - self.xipaiValue=1 - self.anchouValueText=self._config:GetChild('anchoufen') - self.anchouValueText.text=1 - self.anchouValue=1 - + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 1 + + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 + 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 - - if value < 0 then - ViewUtil.ErrorTip(1,"输入数据异常!") - end - - 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( + btn_cr.onClick:Set( function() - - local gniv = GroupNumberInputView_Game.new(nil, function(num) - + local gniv = GroupNumberInputView_Game.new(nil, function(num) local value = limit if otype == 1 then value = value + ad2d(num) - elseif otype == - 1 then + elseif otype == -1 then value = value - ad2d(num) else value = ad2d(num) end - + if value < 0 then - ViewUtil.ErrorTip(1,"输入数据异常!") + ViewUtil.ErrorTip(1, "输入数据异常!") end - - self.anchouValueText.text=value/1000 - self.anchouValue=value/1000 - + + 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 - end + local _help_url = 'ui://Info_Poker_FuLuShou/Com_help' function M:GetHelpUrl() - return _help_url + return _help_url end local _icon_url = "ui://Info_Poker_FuLuShou/icon" function M:GetIconUrl() - return _icon_url + return _icon_url end -local _icon_url1 = "ui://Info_Poker_FuLuShou/icon1" +local _icon_url1 = "ui://NewGroup/group_fulushou" function M:GetIconUrl1() - return _icon_url1 + return _icon_url1 end --local _play_list = {"三人玩法","二人玩法"} function M:GetPlayList() - --return _play_list + --return _play_list end function M:SelectedConfigData() - local _config = self._config - local round = _config:GetController('round').selectedIndex == 0 and 1 or 2 - local renshu = _config:GetController('play_list').selectedIndex +2 - - local xuan_zhuang=_config:GetController('zhuangjia').selectedIndex - local piao=_config:GetController('piao').selectedIndex - local piao1=false - local piao2=false - local piao3=false - local piao4=false - if piao==3 then - piao1=_config:GetChild('pf1').selected and true or false - piao2=_config:GetChild('pf2').selected and true or false - piao3=_config:GetChild('pf3').selected and true or false - piao4=_config:GetChild('pf4').selected and true or false + local _config = self._config + local round = _config:GetController('round').selectedIndex == 0 and 1 or 2 + local renshu = _config:GetController('play_list').selectedIndex + 2 + + local xuan_zhuang = _config:GetController('zhuangjia').selectedIndex + local piao = _config:GetController('piao').selectedIndex + local piao1 = false + local piao2 = false + local piao3 = false + local piao4 = false + if piao == 3 then + piao1 = _config:GetChild('pf1').selected and true or false + piao2 = _config:GetChild('pf2').selected and true or false + piao3 = _config:GetChild('pf3').selected and true or false + piao4 = _config:GetChild('pf4').selected and true or false end - local fen_diejia=_config:GetController('fen').selectedIndex - - local qing_zui_hu=_config:GetController('qinzuihu').selectedIndex - local gang_zhao_liu_xi=_config:GetChild('gangzhao').selected and true or false - local special_peng_peng_hu=_config:GetChild('pengpenghu').selected and true or false - + local fen_diejia = _config:GetController('fen').selectedIndex + + local qing_zui_hu = _config:GetController('qinzuihu').selectedIndex + local gang_zhao_liu_xi = _config:GetChild('gangzhao').selected and true or false + local special_peng_peng_hu = _config:GetChild('pengpenghu').selected and true or false + local piao_fen = _config:GetController('piaofen').selectedIndex - - - local _data = {} - _data['opt'] = round -- 1 2 8局 16 局 - _data['maxPlayers'] = renshu + + + local _data = {} + _data['opt'] = round -- 1 2 8局 16 局 + _data['maxPlayers'] = renshu _data['xuan_zhuang'] = xuan_zhuang _data['piao'] = piao _data['piao1'] = piao1 @@ -160,42 +149,42 @@ function M:SelectedConfigData() elseif (piao_fen == 3) then _data["piao_fen"] = 5 end - - - local xi_pai=false - if oldGameVersion ==2 then - if _config:GetChild("xipai") then + + + local xi_pai = false + if oldGameVersion == 2 then + if _config:GetChild("xipai") then xi_pai = _config:GetChild("xipai").selected end end _data['xi_pai'] = xi_pai - - local xi_pai_score=0 - local an_chou_score=0 - if oldGameVersion==2 then - xi_pai_score=self.xipaiValue - an_chou_score=self.anchouValue + local xi_pai_score = 0 + local an_chou_score = 0 + + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue end - - _data['xi_pai_score'] = xi_pai_score*1000 - _data['an_chou_score'] = an_chou_score*1000 - - - return _data + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + + return _data end function M:LoadConfigData(data) - local _config = self._config + local _config = self._config - _config:GetController('play_list').selectedIndex = data.maxPlayers -2 - _config:GetController('round').selectedIndex = data.opt == 1 and 0 or 1 - _config:GetController('zhuangjia').selectedIndex= data.xuan_zhuang - _config:GetController('piao').selectedIndex= data.piao - _config:GetChild('pf1').selected=data.piao1 - _config:GetChild('pf2').selected=data.piao2 - _config:GetChild('pf3').selected=data.piao3 - _config:GetChild('pf4').selected=data.piao4 + _config:GetController('play_list').selectedIndex = data.maxPlayers - 2 + _config:GetController('round').selectedIndex = data.opt == 1 and 0 or 1 + _config:GetController('zhuangjia').selectedIndex = data.xuan_zhuang + _config:GetController('piao').selectedIndex = data.piao + _config:GetChild('pf1').selected = data.piao1 + _config:GetChild('pf2').selected = data.piao2 + _config:GetChild('pf3').selected = data.piao3 + _config:GetChild('pf4').selected = data.piao4 if (data.piao_fen == 1) then _config:GetController('piaofen').selectedIndex = 0 @@ -207,37 +196,37 @@ function M:LoadConfigData(data) _config:GetController('piaofen').selectedIndex = 3 end - - - _config:GetController('fen').selectedIndex= data.fen_diejia - _config:GetController('qinzuihu').selectedIndex= data.qing_zui_hu + + _config:GetController('fen').selectedIndex = data.fen_diejia + + _config:GetController('qinzuihu').selectedIndex = data.qing_zui_hu _config:GetChild('gangzhao').selected = data.gang_zhao_liu_xi - _config:GetChild('pengpenghu').selected= data.special_peng_peng_hu - - if _config:GetChild("xipai") then - _config:GetChild("xipai").selected=data.xi_pai - end - - if oldGameVersion==2 then - self.xipaiValueText.text=data.xi_pai_score/1000 - self.xipaiValue=data.xi_pai_score/1000 + _config:GetChild('pengpenghu').selected = data.special_peng_peng_hu - self.anchouValueText.text=data.an_chou_score/1000 - self.anchouValue=data.an_chou_score/1000 + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 end - end function M:OnChangeOption(ctype) - IGameInfo.OnChangeOption(self, ctype) + IGameInfo.OnChangeOption(self, ctype) - local play_list = self._config:GetController('play_list') - play_list.onChanged:Add( - function() - self._maxPlayer = play_list.selectedIndex +2 - self:ShowVariablePrice(ctype) - end - ) + local play_list = self._config:GetController('play_list') + play_list.onChanged:Add( + function() + self._maxPlayer = play_list.selectedIndex + 2 + self:ShowVariablePrice(ctype) + end + ) end + return M diff --git a/fk101/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameInfo.lua b/fk101/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameInfo.lua index 2e5ef647..c672f533 100644 --- a/fk101/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameInfo.lua +++ b/fk101/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameInfo.lua @@ -3,134 +3,124 @@ local EXGameInfo = {} local M = EXGameInfo function EXGameInfo.new(blur_view) - setmetatable(M, {__index = IGameInfo}) - local self = setmetatable({}, {__index = M}) - self.class = 'EXGameInfo' - UIPackage.AddPackage('extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ') - return self + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = 'EXGameInfo' + UIPackage.AddPackage('extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ') + return self end function M:FillData() - self._maxPlayer = 3 -- 默认玩家人数 - self._roundChoice = 2 -- 回合选项数 - self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_YueYangWHZ/Cgm_create_room') - - if oldGameVersion ==1 then - self._config:GetController("xipai").selectedIndex=0 + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 2 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_YueYangWHZ/Cgm_create_room') + + if oldGameVersion == 1 then + self._config:GetController("xipai").selectedIndex = 0 end - - if oldGameVersion==2 then - self._config:GetController("xipai").selectedIndex=1 - - self.xipaiValueText=self._config:GetChild('xipaifen') - self.xipaiValueText.text=1 - self.xipaiValue=1 - self.anchouValueText=self._config:GetChild('anchoufen') - self.anchouValueText.text=1 - self.anchouValue=1 - + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 1 + + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 + 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 - - if value < 0 then - ViewUtil.ErrorTip(1,"输入数据异常!") - end - - 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( + btn_cr.onClick:Set( function() - - local gniv = GroupNumberInputView_Game.new(nil, function(num) - + local gniv = GroupNumberInputView_Game.new(nil, function(num) local value = limit if otype == 1 then value = value + ad2d(num) - elseif otype == - 1 then + elseif otype == -1 then value = value - ad2d(num) else value = ad2d(num) end - + if value < 0 then - ViewUtil.ErrorTip(1,"输入数据异常!") + ViewUtil.ErrorTip(1, "输入数据异常!") end - - self.anchouValueText.text=value/1000 - self.anchouValue=value/1000 - + + 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 - end + local _help_url = 'ui://Info_Poker_YueYangWHZ/Com_help' function M:GetHelpUrl() - return _help_url + return _help_url end local _icon_url = "ui://Info_Poker_YueYangWHZ/icon" function M:GetIconUrl() - return _icon_url + return _icon_url end -local _icon_url1 = "ui://Info_Poker_YueYangWHZ/icon1" +local _icon_url1 = "ui://NewGroup/group_waihuzi" function M:GetIconUrl1() - return _icon_url1 + return _icon_url1 end --local _play_list = {"三人玩法","二人玩法"} function M:GetPlayList() - --return _play_list + --return _play_list end function M:SelectedConfigData() - local _config = self._config - local round = _config:GetController('round').selectedIndex == 0 and 1 or 2 - local renshu = _config:GetController('play_list').selectedIndex +2 - - local kawai=_config:GetController('kawai').selectedIndex - local piao=_config:GetController('piao').selectedIndex - local first_rand_zhuang=_config:GetChild('suijizhuang').selected and true or false - local zhuang_di_hu=_config:GetController('zdihu').selectedIndex - local hao_config=_config:GetController('hao').selectedIndex - local hao_jiabei=_config:GetController('jiabei').selectedIndex - local ming_tang=_config:GetController('mingtang').selectedIndex - local qupai=0 - if renshu==2 then - qupai=_config:GetController('qupai').selectedIndex + local _config = self._config + local round = _config:GetController('round').selectedIndex == 0 and 1 or 2 + local renshu = _config:GetController('play_list').selectedIndex + 2 + + local kawai = _config:GetController('kawai').selectedIndex + local piao = _config:GetController('piao').selectedIndex + local first_rand_zhuang = _config:GetChild('suijizhuang').selected and true or false + local zhuang_di_hu = _config:GetController('zdihu').selectedIndex + local hao_config = _config:GetController('hao').selectedIndex + local hao_jiabei = _config:GetController('jiabei').selectedIndex + local ming_tang = _config:GetController('mingtang').selectedIndex + local qupai = 0 + if renshu == 2 then + qupai = _config:GetController('qupai').selectedIndex end - - local _data = {} - _data['opt'] = round -- 1 2 8局 16 局 - _data['maxPlayers'] = renshu + + local _data = {} + _data['opt'] = round -- 1 2 8局 16 局 + _data['maxPlayers'] = renshu _data['kawai'] = kawai _data['piao'] = piao _data['zhuang_di_hu'] = zhuang_di_hu @@ -139,66 +129,66 @@ function M:SelectedConfigData() _data['ming_tang'] = ming_tang _data['first_rand_zhuang'] = first_rand_zhuang _data['qupai'] = qupai - - local xi_pai=false - if oldGameVersion ==2 then - if _config:GetChild("xipai") then + + local xi_pai = false + if oldGameVersion == 2 then + if _config:GetChild("xipai") then xi_pai = _config:GetChild("xipai").selected end end _data['xi_pai'] = xi_pai - - local xi_pai_score=0 - local an_chou_score=0 - if oldGameVersion==2 then - xi_pai_score=self.xipaiValue - an_chou_score=self.anchouValue + local xi_pai_score = 0 + local an_chou_score = 0 + + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue end - - _data['xi_pai_score'] = xi_pai_score*1000 - _data['an_chou_score'] = an_chou_score*1000 - - return _data + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + return _data end function M:LoadConfigData(data) - local _config = self._config + local _config = self._config - _config:GetController('play_list').selectedIndex = data.maxPlayers -2 - _config:GetController('round').selectedIndex = data.opt == 1 and 0 or 1 - _config:GetController('kawai').selectedIndex=data.kawai - _config:GetController('piao').selectedIndex=data.piao - _config:GetChild('suijizhuang').selected =data.first_rand_zhuang - _config:GetController('zdihu').selectedIndex=data.zhuang_di_hu - _config:GetController('hao').selectedIndex=data.hao_config - _config:GetController('jiabei').selectedIndex=data.hao_jiabei - _config:GetController('mingtang').selectedIndex=data.ming_tang - _config:GetController('qupai').selectedIndex=data.qupai - - if _config:GetChild("xipai") then - _config:GetChild("xipai").selected=data.xi_pai - end - - if oldGameVersion==2 then - self.xipaiValueText.text=data.xi_pai_score/1000 - self.xipaiValue=data.xi_pai_score/1000 + _config:GetController('play_list').selectedIndex = data.maxPlayers - 2 + _config:GetController('round').selectedIndex = data.opt == 1 and 0 or 1 + _config:GetController('kawai').selectedIndex = data.kawai + _config:GetController('piao').selectedIndex = data.piao + _config:GetChild('suijizhuang').selected = data.first_rand_zhuang + _config:GetController('zdihu').selectedIndex = data.zhuang_di_hu + _config:GetController('hao').selectedIndex = data.hao_config + _config:GetController('jiabei').selectedIndex = data.hao_jiabei + _config:GetController('mingtang').selectedIndex = data.ming_tang + _config:GetController('qupai').selectedIndex = data.qupai - self.anchouValueText.text=data.an_chou_score/1000 - self.anchouValue=data.an_chou_score/1000 + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 end - end function M:OnChangeOption(ctype) - IGameInfo.OnChangeOption(self, ctype) + IGameInfo.OnChangeOption(self, ctype) - local play_list = self._config:GetController('play_list') - play_list.onChanged:Add( - function() - self._maxPlayer = play_list.selectedIndex +2 - self:ShowVariablePrice(ctype) - end - ) + local play_list = self._config:GetController('play_list') + play_list.onChanged:Add( + function() + self._maxPlayer = play_list.selectedIndex + 2 + self:ShowVariablePrice(ctype) + end + ) end + return M diff --git a/fk101/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info b/fk101/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info index 2db68bf3..189027fb 100644 --- a/fk101/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info +++ b/fk101/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info @@ -1,7 +1,7 @@ { "objectStatus": { - "n28": { - "collapsed": true + "n54_lwcl": { + "hidden": true }, "n125_g8kk": { "hidden": true @@ -18,9 +18,6 @@ "n130_naup": { "hidden": true }, - "n54_lwcl": { - "hidden": true - }, "n50_lwcl": { "hidden": true }, diff --git a/fk101/wb_new_ui/assets/Lobby/Main.xml b/fk101/wb_new_ui/assets/Lobby/Main.xml index a87c4d40..cd30e0e0 100644 --- a/fk101/wb_new_ui/assets/Lobby/Main.xml +++ b/fk101/wb_new_ui/assets/Lobby/Main.xml @@ -13,16 +13,6 @@ - - - -