diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua index ffbbe023..979781d8 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua @@ -181,6 +181,8 @@ function M:fillResult0(room, peopleNum, result) local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard") local handCardList = handCardItem:GetChild("list") + --手牌排序 + table.sort(infoList.hand_card, ViewUtil.HandCardSort) handCardList:SetVirtual() handCardList.itemRenderer = function(index, obj) obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1]) diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua index e6972975..87b5834a 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua @@ -367,7 +367,7 @@ function M:EventInit() local index = self:GetPos(win_seat) local info = self._player_card_info[index] self:RemoveCursor() - info:UpdateHandCard(true, true) + info:UpdateHandCard(false, true) local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card_jiangxi") obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXClearingView.lua index ffbbe023..979781d8 100644 --- a/lua_probject/extend_project/extend/majiang/jinxi/EXClearingView.lua +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXClearingView.lua @@ -181,6 +181,8 @@ function M:fillResult0(room, peopleNum, result) local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard") local handCardList = handCardItem:GetChild("list") + --手牌排序 + table.sort(infoList.hand_card, ViewUtil.HandCardSort) handCardList:SetVirtual() handCardList.itemRenderer = function(index, obj) obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1]) diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXClearingView.lua index b86c3369..51eff233 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXClearingView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXClearingView.lua @@ -181,6 +181,8 @@ function M:fillResult0(room, peopleNum, result) local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard") local handCardList = handCardItem:GetChild("list") + --手牌排序 + table.sort(infoList.hand_card, ViewUtil.HandCardSort) handCardList:SetVirtual() handCardList.itemRenderer = function(index, obj) obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1]) diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua index d88e17b1..12114395 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua @@ -365,7 +365,7 @@ function M:EventInit() local index = self:GetPos(win_seat) local info = self._player_card_info[index] self:RemoveCursor() - info:UpdateHandCard(true, true) + info:UpdateHandCard(false, true) local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card_jiangxi") obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua index 2d5f5eb1..d3030e53 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua @@ -179,26 +179,20 @@ function M:fillResult0(room, peopleNum, result) end end + local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard") local handCardList = handCardItem:GetChild("list") --手牌排序 table.sort(infoList.hand_card, ViewUtil.HandCardSort) handCardList:SetVirtual() - --去除赢家手牌标志 - local flag_remove = infoList.is_win - local num_add = 0 handCardList.itemRenderer = function(index, obj) - if infoList.win_card == infoList.hand_card[index + 1] and flag_remove then - flag_remove = false - num_add = 1 - end obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), - infoList.hand_card[index + num_add + 1]) + infoList.hand_card[index + 1]) if room.jing == infoList.hand_card[index + 1] then obj:GetController('jing').selectedIndex = 1 end end - handCardList.numItems = infoList.is_win and handInfoNum - 1 or handInfoNum + handCardList.numItems = handInfoNum allCardsList.width = 172 * fzInfoNum + 60 + (handInfoNum - 1) * 56 + 36 * (fzInfoNum) if infoList.seat == room.self_player.seat then diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua index a1e21b52..d167a100 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua @@ -365,7 +365,7 @@ function M:EventInit() local index = self:GetPos(win_seat) local info = self._player_card_info[index] self:RemoveCursor() - info:UpdateHandCard(true, true) + info:UpdateHandCard(false, true) local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card_jiangxi") obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card