麻将结算页面显示精和庄家

master
罗家炜 2025-04-18 15:09:32 +08:00
parent 9b2b975130
commit 0efbe3c99b
10 changed files with 35 additions and 8 deletions

View File

@ -32,6 +32,10 @@ end
-- end -- end
function M:InitData(over, room, result, total_result, callback) function M:InitData(over, room, result, total_result, callback)
-- print("===============================InitData===========================", over, room, result, total_result)
-- pt(room)
-- pt(result)
-- Pt(total_result)
self._callback = callback self._callback = callback
local showClearMainBtn = self._view:GetChild("btn_showClearMain") local showClearMainBtn = self._view:GetChild("btn_showClearMain")
local nextRoundBtn = self._view:GetChild("btn_nextRound") local nextRoundBtn = self._view:GetChild("btn_nextRound")
@ -108,6 +112,7 @@ function M:fillResult0(room, peopleNum, result)
local ziMoCtr = playerInfoComp:GetController("isZiMo") local ziMoCtr = playerInfoComp:GetController("isZiMo")
local dianPaoCtr = playerInfoComp:GetController("isPao") local dianPaoCtr = playerInfoComp:GetController("isPao")
local isMeCtr = playerInfoComp:GetController("IsMe") local isMeCtr = playerInfoComp:GetController("IsMe")
local isZhuang = playerInfoComp:GetController("zhuang")
local infoList = result.info_list[i] local infoList = result.info_list[i]
local playInfo = room:GetPlayerBySeat(infoList.seat) local playInfo = room:GetPlayerBySeat(infoList.seat)
@ -133,6 +138,10 @@ function M:fillResult0(room, peopleNum, result)
for l = 1, 3 do for l = 1, 3 do
local card = item:GetChild(string.format("Btn_Card%d", l)) local card = item:GetChild(string.format("Btn_Card%d", l))
card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].card) card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].card)
print("===============================FZType.Peng", room.jing, fzCardInfo[j].card)
if room.jing == fzCardInfo[j].card then
card:GetController('jing').selectedIndex = 1
end
end end
elseif fzCardInfo[j].type == FZType.Chi then elseif fzCardInfo[j].type == FZType.Chi then
local item = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_Clearing_FZ_3") local item = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_Clearing_FZ_3")
@ -140,6 +149,11 @@ function M:fillResult0(room, peopleNum, result)
local card = item:GetChild(string.format("Btn_Card%d", l)) local card = item:GetChild(string.format("Btn_Card%d", l))
card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].opcard card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].opcard
[l]) [l])
print("===============================FZType.Chi", room.jing, fzCardInfo[j].opcard[l])
if room.jing == fzCardInfo[j].opcard[l] then
card:GetController('jing').selectedIndex = 1
end
end end
elseif fzCardInfo[j].type == FZType.Gang or fzCardInfo[j].type == FZType.Gang_An or fzCardInfo[j].type == FZType.Gang_Peng then elseif fzCardInfo[j].type == FZType.Gang or fzCardInfo[j].type == FZType.Gang_An or fzCardInfo[j].type == FZType.Gang_Peng then
local item = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_Clearing_FZ_4") local item = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_Clearing_FZ_4")
@ -149,6 +163,11 @@ function M:fillResult0(room, peopleNum, result)
card.icon = "ui://Main_Majiang/202_00" card.icon = "ui://Main_Majiang/202_00"
else else
card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].card) card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].card)
print("===============================FZType.Gang", room.jing, fzCardInfo[j].card)
if room.jing == fzCardInfo[j].card then
card:GetController('jing').selectedIndex = 1
end
end end
end end
end end
@ -159,6 +178,10 @@ function M:fillResult0(room, peopleNum, result)
handCardList:SetVirtual() handCardList:SetVirtual()
handCardList.itemRenderer = function(index, obj) handCardList.itemRenderer = function(index, obj)
obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1]) obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1])
print("=================================FZType", room.jing)
if room.jing == infoList.hand_card[index + 1] then
obj:GetController('jing').selectedIndex = 1
end
end end
handCardList.numItems = handInfoNum handCardList.numItems = handInfoNum
allCardsList.width = 172 * fzInfoNum + 60 + (handInfoNum - 1) * 56 + 36 * (fzInfoNum) allCardsList.width = 172 * fzInfoNum + 60 + (handInfoNum - 1) * 56 + 36 * (fzInfoNum)
@ -167,6 +190,10 @@ function M:fillResult0(room, peopleNum, result)
isMeCtr.selectedIndex = 1 isMeCtr.selectedIndex = 1
end end
if infoList.seat == room.banker_seat then
isZhuang.selectedIndex = 1
end
if infoList.is_win then if infoList.is_win then
local winInfo = "" local winInfo = ""
for j = 1, #infoList.win_list do for j = 1, #infoList.win_list do

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant:

View File

@ -3,5 +3,5 @@ guid: 326fa64ee0dd8b94aa86fa1978e56fa5
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant: assetBundleVariant: