This commit is contained in:
puxuan 2025-11-05 18:47:02 +08:00
parent 2a515e0a75
commit a3ef81c2fa
2 changed files with 6 additions and 4 deletions

View File

@ -187,7 +187,7 @@ function ArenaMatchUI:showMatchResult()
self.txFormation:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_10)) self.txFormation:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_10))
self.imgAd:setActive(DataManager.ArenaData:canAdRematch()) self.imgAd:setActive(DataManager.ArenaData:canAdRematch())
self.matchAvatar:refresh(matchInfo.avatar, matchInfo.avatar_frame) self.matchAvatar:refresh(matchInfo.avatar, matchInfo.avatar_frame, nil, true)
local name = matchInfo.name local name = matchInfo.name
if name == nil or #name == 0 then if name == nil or #name == 0 then
name = I18N:getGlobalText(I18N.GlobalConst.NEW_PLAYER) name = I18N:getGlobalText(I18N.GlobalConst.NEW_PLAYER)
@ -197,7 +197,7 @@ function ArenaMatchUI:showMatchResult()
self.matchGrading:refresh(DataManager.ArenaData:getGradingIdFromScore(matchInfo.score)) self.matchGrading:refresh(DataManager.ArenaData:getGradingIdFromScore(matchInfo.score))
self.matchHeroFormationComp:refreshByEntitys(GFunc.formatPlayerFormationInfo(matchInfo)) self.matchHeroFormationComp:refreshByEntitys(GFunc.formatPlayerFormationInfo(matchInfo))
self.selfAvatar:refresh() self.selfAvatar:refresh(nil, nil, nil, true)
self.selfTxName:setText(DataManager.PlayerData:getNickname()) self.selfTxName:setText(DataManager.PlayerData:getNickname())
self.selfTxLevel:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, DataManager.PlayerData:getLv())) self.selfTxLevel:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, DataManager.PlayerData:getLv()))
self.selfGrading:refresh(DataManager.ArenaData:getGradingId()) self.selfGrading:refresh(DataManager.ArenaData:getGradingId())

View File

@ -8,7 +8,7 @@ function PlayerHeadCell:init()
end end
-- (avatarId头像idframeId头像框id) -- (avatarId头像idframeId头像框id)
function PlayerHeadCell:refresh(avatarId, frameId, showRp) function PlayerHeadCell:refresh(avatarId, frameId, showRp, showNormal)
if avatarId == nil or frameId == nil then if avatarId == nil or frameId == nil then
-- 是玩家自己 -- 是玩家自己
avatarId = DataManager.PlayerData:getUsingAvatarId() avatarId = DataManager.PlayerData:getUsingAvatarId()
@ -31,7 +31,9 @@ function PlayerHeadCell:refresh(avatarId, frameId, showRp)
-- 头像框 -- 头像框
local frameName = DataManager.PlayerData:getFrameIconId(frameId) local frameName = DataManager.PlayerData:getFrameIconId(frameId)
if frameName then if showNormal then
self.imgFrame:setSprite(GConst.ATLAS_PATH.ICON_AVATAR, "avatar_frame_2")
elseif frameName then
self.imgFrame:setSprite(GConst.ATLAS_PATH.ICON_AVATAR, frameName, function() self.imgFrame:setSprite(GConst.ATLAS_PATH.ICON_AVATAR, frameName, function()
self.imgFrame:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize() self.imgFrame:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
end) end)