亲友圈玩法列表按规则排序
parent
8b5c8c3489
commit
095b2079fe
|
|
@ -913,6 +913,7 @@ local function __analysePlayListData(self)
|
|||
self.playIdList[count] = p_data.id
|
||||
end
|
||||
end
|
||||
table.sort(self.playIdList, handler(self, self.SortPlayList))
|
||||
|
||||
local lst_layer = self.lst_layer
|
||||
-- printlog("添加玩法====>>>>",count)
|
||||
|
|
@ -1355,6 +1356,7 @@ function M:__loadLastData()
|
|||
table.insert(self.curRooms, room)
|
||||
self.playNames[t.id] = t.name
|
||||
end
|
||||
table.sort(self.playIdList, handler(self, self.SortPlayList))
|
||||
self.lst_game.numItems = #self.gameIdList + 1
|
||||
self.lst_layer.visible = false
|
||||
--self.line1.visible = false
|
||||
|
|
@ -2124,6 +2126,23 @@ function M:Show()
|
|||
end
|
||||
end
|
||||
|
||||
function M:SortPlayList(a, b)
|
||||
local a_play = self.curGroup:getPlay(a)
|
||||
local b_play = self.curGroup:getPlay(b)
|
||||
|
||||
if a_play.gameType == b_play.gameType then
|
||||
if a_play.gameId == a_play.gameId then
|
||||
return a_play.id < b_play.id
|
||||
else
|
||||
return a_play.gameId < b_play.gameId
|
||||
end
|
||||
else
|
||||
pt(a_play)
|
||||
pt(b_play)
|
||||
return a_play.gameType < b_play.gameType
|
||||
end
|
||||
end
|
||||
|
||||
function M:Destroy()
|
||||
BaseView.Destroy(self)
|
||||
UpdateBeat:Remove(self.__onUpdate, self)
|
||||
|
|
|
|||
|
|
@ -494,6 +494,7 @@ function M:FillFagData()
|
|||
play.maxPlayers = _data.maxPlayers
|
||||
play.roomNum = self.hpData.tex_times_room / 100
|
||||
play.maxRound = res.Data.maxRound
|
||||
play.gameType = res.Data.gameType
|
||||
ViewUtil.ShowBannerOnScreenCenter("添加玩法成功")
|
||||
self.callback(play)
|
||||
self:Destroy()
|
||||
|
|
|
|||
|
|
@ -41,13 +41,9 @@ function M:init(name)
|
|||
self._eventmap[RB_Protocol.GAME_EVT_RESULT1] = self.OneventResult1
|
||||
self._eventmap[RB_Protocol.GAME_EVT_QIPAI] = self.OnEventQIPAI
|
||||
self._eventmap[RB_Protocol.GAME_EVT_ADD_CARD] = self.OnAddCard
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
function M:SendXiPaiAction(callBack)
|
||||
|
||||
local _data = {}
|
||||
local _client = ControllerManager.GameNetClinet
|
||||
_client:send(RB_Protocol.GAME_XIPAI, _data)
|
||||
|
|
@ -69,9 +65,6 @@ function M:OnEventDaNiaoTip(evt_data)
|
|||
ControllerManager.IsSendCard = true
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
function M:SendNiao(niao, callBack)
|
||||
|
|
@ -99,7 +92,6 @@ function M:OnEventDaNiao(evt_data)
|
|||
end
|
||||
|
||||
function M:OnEventXiPai(evt_data)
|
||||
|
||||
if evt_data["result"] == 0 then
|
||||
if self.XiPaiCallBack then
|
||||
self.XiPaiCallBack()
|
||||
|
|
@ -107,7 +99,6 @@ function M:OnEventXiPai(evt_data)
|
|||
else
|
||||
ViewUtil.ErrorTip(1000000, "申请洗牌失败")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function M:OnEventXiPaiAnim(evt_data)
|
||||
|
|
@ -139,8 +130,8 @@ function M:SendOutCard(card)
|
|||
if _client ~= nil then
|
||||
_client:send(RB_Protocol.GAME_DIS_CARD, _data)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--GAME_CHANGE_CARD GAME_DIS_CARD
|
||||
function M:SendChangeCards(card_list)
|
||||
local _data = {}
|
||||
|
|
@ -169,8 +160,6 @@ function M:SendFangPao(card)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function M:SendChangeTypeFace(TypeFace)
|
||||
-- body
|
||||
local _data = {}
|
||||
|
|
@ -181,7 +170,6 @@ function M:SendChangeTypeFace(TypeFace)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
function M:ConformToNextGame()
|
||||
local _client = ControllerManager.GameNetClinet
|
||||
if _client ~= nil then
|
||||
|
|
@ -224,7 +212,8 @@ function M:OnEventSendCards(evt_data)
|
|||
seat = evt_data["bank_seat"]
|
||||
else
|
||||
ViewUtil.ErrorTip(100001, "发牌座位异常")
|
||||
end _room.banker_seat = seat
|
||||
end
|
||||
_room.banker_seat = seat
|
||||
for i = 1, #_room.player_list do
|
||||
_room.self_player.handcard_list = {}
|
||||
_room.self_player.card_list = {}
|
||||
|
|
@ -306,7 +295,6 @@ function M:OnEventOutHint(evt_data)
|
|||
self._cacheEvent:Enqueue(function()
|
||||
DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.OutHint)
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
function M:OnEventTurn(evt_data)
|
||||
|
|
@ -317,7 +305,6 @@ function M:OnEventTurn(evt_data)
|
|||
end
|
||||
|
||||
function M:OnEventFzTips(evt_data)
|
||||
|
||||
self._cacheEvent:Enqueue(function()
|
||||
local tiplist = FZTipList.new()
|
||||
local list = evt_data["tip_list"]
|
||||
|
|
@ -341,7 +328,6 @@ function M:OnEventFzTips(evt_data)
|
|||
end
|
||||
tiplist:AddTip(tip)
|
||||
-- end
|
||||
|
||||
end
|
||||
DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.FZTips, tiplist, uid, fptype)
|
||||
end)
|
||||
|
|
@ -429,7 +415,6 @@ function M:OnEventFzAction(evt_data)
|
|||
end
|
||||
end
|
||||
elseif ftype == RB_FZType.Pao then
|
||||
|
||||
if (p == _room.self_player) then
|
||||
for i = 1, #p.fz_list do
|
||||
if p.fz_list[i].card == card then
|
||||
|
|
@ -467,7 +452,6 @@ function M:OnEventFzAction(evt_data)
|
|||
p.fz_list[#p.fz_list + 1] = fz
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
local num = 0
|
||||
for i = 1, #p.fz_list do
|
||||
|
|
@ -481,9 +465,7 @@ function M:OnEventFzAction(evt_data)
|
|||
p.fz_list[#p.fz_list + 1] = fz
|
||||
end
|
||||
end
|
||||
|
||||
elseif ftype == RB_FZType.Ti then
|
||||
|
||||
if (p == _room.self_player) then
|
||||
for i = 1, #p.fz_list do
|
||||
if p.fz_list[i].card == card then
|
||||
|
|
@ -521,7 +503,6 @@ function M:OnEventFzAction(evt_data)
|
|||
p.fz_list[#p.fz_list + 1] = fz
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
local num = 0
|
||||
for i = 1, #p.fz_list do
|
||||
|
|
@ -534,9 +515,7 @@ function M:OnEventFzAction(evt_data)
|
|||
if num == 0 then
|
||||
p.fz_list[#p.fz_list + 1] = fz
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -549,7 +528,6 @@ function M:OnEventFzAction(evt_data)
|
|||
else
|
||||
DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.FangziAction, fz, p, isNeedDelHandCard)
|
||||
end
|
||||
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -572,7 +550,6 @@ function M:OneventResult1(evt_data)
|
|||
self._room.playing = false
|
||||
|
||||
if 0 == over then
|
||||
|
||||
local result = evt_data.result
|
||||
for i = 1, #self._room.player_list do
|
||||
local p = self._room.player_list[i]
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
"n175_mn85": {
|
||||
"collapsed": true
|
||||
},
|
||||
"n74_i7lq": {
|
||||
"locked": true
|
||||
},
|
||||
"n243_n6w8": {
|
||||
"hidden": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="200,750" opaque="false" initName="player_card_info">
|
||||
<displayList>
|
||||
<list id="n47_lr5d" name="area_fz_list" xy="16,2" pivot="0.5,0.5" size="315,173" rotation="180" layout="row" scroll="horizontal" colGap="5" defaultItem="ui://v6yvqp7wlr5d30" align="right" vAlign="bottom"/>
|
||||
<list id="n47_lr5d" name="area_fz_list" xy="11,2" pivot="0.5,0.5" size="465,173" rotation="180" layout="row" scroll="horizontal" colGap="5" defaultItem="ui://v6yvqp7wyxjj19a" align="right" vAlign="bottom"/>
|
||||
<list id="n48_lr5d" name="windcard_list" xy="16,196" size="280,78" layout="flow_hz" selectionMode="none" scroll="horizontal" lineGap="1" colGap="1" defaultItem="ui://v6yvqp7wf55qvw" vAlign="bottom"/>
|
||||
<component id="n50_n1ry" name="mask_liangpai" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="200,83" size="5,5"/>
|
||||
<component id="n25" name="area_outcard_list" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="322,19" size="67,182" touchable="false"/>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<image id="n245_ilon" name="n245" src="n6w87i9h" fileName="images/Rectangle 9.png" xy="0,1" size="1334,120">
|
||||
<relation target="" sidePair="width-width%"/>
|
||||
</image>
|
||||
<image id="n244_n6w8" name="n244" src="n6w87i9h" fileName="images/Rectangle 9.png" xy="0,661" size="1334,89">
|
||||
<image id="n244_n6w8" name="n244" src="n6w87i9h" fileName="images/Rectangle 9.png" xy="0,662" size="1334,86">
|
||||
<relation target="" sidePair="width-width%,height-height%"/>
|
||||
</image>
|
||||
<image id="n246_ilon" name="n246" src="ilon7i9i" fileName="Rectangle 12.png" xy="0,0" size="249,121"/>
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
<image id="n248_ilon" name="n248" src="ilon7i9j" fileName="Rectangle 13.png" xy="261,46" size="212,69" group="n206_jvvo">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</image>
|
||||
<text id="n251_ilon" name="tex_hp_title" xy="273,49" size="76,31" group="n206_jvvo" font="Microsoft YaHei" fontSize="22" color="#ffffff" align="center" vAlign="middle" bold="true" text="疲劳值:">
|
||||
<text id="n251_ilon" name="tex_hp_title" xy="273,49" size="76,32" group="n206_jvvo" font="Microsoft YaHei" fontSize="22" color="#ffffff" align="center" vAlign="middle" bold="true" text="疲劳值:">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</text>
|
||||
<text id="n250_ilon" name="tex_fag" xy="355,49" size="113,32" group="n206_jvvo" font="Microsoft YaHei" fontSize="22" color="#ffffff" vAlign="middle" autoSize="none" bold="true" text="A79B17">
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
<text id="n205_jvvo" name="tex_hp" xy="344,80" size="113,32" group="n206_jvvo" font="Microsoft YaHei" fontSize="22" color="#ffffff" vAlign="middle" autoSize="none" bold="true" text="7">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</text>
|
||||
<text id="n216_ovii" name="n216" xy="221,-77" size="94,41" group="n206_jvvo" visible="false" font="Microsoft YaHei" fontSize="30" color="#ffffff" vAlign="middle" text="积分:">
|
||||
<text id="n216_ovii" name="n216" xy="221,-77" size="94,42" group="n206_jvvo" visible="false" font="Microsoft YaHei" fontSize="30" color="#ffffff" vAlign="middle" text="积分:">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</text>
|
||||
<image id="n229_csp4" name="n229" src="csp47i3u" fileName="images/room/jifen.png" xy="237,-61" group="n206_jvvo" visible="false"/>
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
<text id="n253_ilon" name="tex_id" xy="90,53" size="158,39" group="n78_i7lq" font="Microsoft YaHei" fontSize="28" color="#ffffff" vAlign="middle" autoSize="shrink" bold="true" text="老司机带带我">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</text>
|
||||
<text id="n254_ilon" name="tex_tableNum" xy="90,87" size="136,31" group="n78_i7lq" font="Microsoft YaHei" fontSize="22" color="#ffffff" vAlign="middle" bold="true" text="老司机带带我">
|
||||
<text id="n254_ilon" name="tex_tableNum" xy="90,87" size="136,32" group="n78_i7lq" font="Microsoft YaHei" fontSize="22" color="#ffffff" vAlign="middle" bold="true" text="老司机带带我">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</text>
|
||||
<group id="n78_i7lq" name="title" xy="90,11" size="158,108" group="n176_mn85" advanced="true"/>
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
<item/>
|
||||
<item/>
|
||||
</list>
|
||||
<list id="n122_gg9f" name="lst_layer" xy="17,665" size="1090,80" layout="row" overflow="scroll" scroll="horizontal" lineGap="1" colGap="13" defaultItem="ui://m7iejg46jiu8hef" autoClearItems="true">
|
||||
<list id="n122_gg9f" name="lst_layer" xy="17,665" size="1090,80" layout="row" overflow="scroll" scroll="horizontal" lineGap="1" colGap="13" defaultItem="ui://m7iejg46jiu8hef" align="center" autoClearItems="true">
|
||||
<gearDisplay controller="search" pages="0"/>
|
||||
<relation target="" sidePair="width-width%,height-height%,bottom-bottom"/>
|
||||
<item/>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<controller name="all" pages="0,,1," selected="0"/>
|
||||
<displayList>
|
||||
<component id="n18_pw15" name="pipeijoin" src="pw157i8w" fileName="component/Lst_info/pipeijoin2.xml" xy="3,-79" size="208,50" visible="false" touchable="false"/>
|
||||
<image id="n12_oryt" name="n12" src="oryt7i3a" fileName="images/info/button_01.png" xy="0,0" size="181,80" alpha="0.986">
|
||||
<image id="n12_oryt" name="n12" src="oryt7i3a" fileName="images/info/button_01.png" xy="0,6" size="181,67" alpha="0.986">
|
||||
<gearDisplay controller="button" pages="0"/>
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
|
|
@ -18,12 +18,12 @@
|
|||
<gearDisplay controller="all" pages="1"/>
|
||||
<gearColor controller="button" pages="0,1" values="#af4300,#000000|#4e1e00,#000000"/>
|
||||
</text>
|
||||
<text id="n27_n6w8" name="tex_gameName" xy="0,-1" size="180,48" font="Microsoft YaHei" fontSize="32" color="#af4300" align="center" vAlign="middle" autoSize="shrink" bold="true" text="全部游戏">
|
||||
<text id="n27_n6w8" name="tex_gameName" xy="0,2" size="180,48" font="Microsoft YaHei" fontSize="32" color="#af4300" align="center" vAlign="middle" autoSize="shrink" bold="true" text="全部游戏">
|
||||
<gearDisplay controller="all" pages="0"/>
|
||||
<gearColor controller="button" pages="0,1" values="#af4300,#000000|#4e1e00,#000000"/>
|
||||
<relation target="" sidePair="width-width%,height-height%"/>
|
||||
</text>
|
||||
<text id="n28_n6w8" name="tex_playName" xy="0,46" size="180,34" font="Microsoft YaHei" fontSize="22" color="#444444" align="center" vAlign="middle" autoSize="shrink" bold="true" text="全部游戏">
|
||||
<text id="n28_n6w8" name="tex_playName" xy="0,39" size="180,34" font="Microsoft YaHei" fontSize="22" color="#444444" align="center" vAlign="middle" autoSize="shrink" bold="true" text="全部游戏">
|
||||
<gearDisplay controller="all" pages="0"/>
|
||||
<gearColor controller="button" pages="0,1" values="#444444,#000000|#4e1e00,#000000"/>
|
||||
<relation target="" sidePair="width-width%,height-height%"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue