From a75edf5771dd8625550ceee9539b74fb698c2864 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 18 三月 2026 21:45:42 +0800
Subject: [PATCH] 262 幻境阁-客户端 称号适配直接显示原尺寸大小,按示意图实现尺寸缩放
---
Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs | 7 +--
Main/System/PhantasmPavilion/PhantasmPavilionTitleItem.cs | 9 +---
Main/System/PhantasmPavilion/PhantasmPavilionFacePicItem.cs | 2
Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs | 4 +-
Main/System/PhantasmPavilion/PhantasmPavilionManager.cs | 31 ++++++++++-----
Main/System/Arena/ArenaRecordCell.cs | 2
Main/System/Arena/ArenaChallengeCell.cs | 2
Main/System/OfficialRank/OfficialTitleCell.cs | 5 +-
Main/System/PhantasmPavilion/AvatarCell.cs | 2
Main/System/PhantasmPavilion/PhantasmPavilionChatBoxItem.cs | 2
10 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/Main/System/Arena/ArenaChallengeCell.cs b/Main/System/Arena/ArenaChallengeCell.cs
index 5ba1544..f18037a 100644
--- a/Main/System/Arena/ArenaChallengeCell.cs
+++ b/Main/System/Arena/ArenaChallengeCell.cs
@@ -42,7 +42,7 @@
txtFightPoint.text = UIHelper.ReplaceLargeArtNum(arenaMatchInfo.FightPower);
txtAddScore.text = Language.Get("Arena16", ArenaManager.Instance.GetChallengePoints(index));
- officialTitleCell.InitUI(arenaMatchInfo.RealmLV, (int)arenaMatchInfo.TitleID);
+ officialTitleCell.InitUI(arenaMatchInfo.RealmLV, (int)arenaMatchInfo.TitleID, 0.65f);
int[][] rewards = ArenaManager.Instance.fixedChallengeRewards;
for (int i = 0; i < itemCells.Count; i++)
diff --git a/Main/System/Arena/ArenaRecordCell.cs b/Main/System/Arena/ArenaRecordCell.cs
index 36decc3..ba9d294 100644
--- a/Main/System/Arena/ArenaRecordCell.cs
+++ b/Main/System/Arena/ArenaRecordCell.cs
@@ -71,7 +71,7 @@
});
txtName.text = arenaGameRec.Name;
txtFightPoint.text = UIHelper.ReplaceLargeArtNum(arenaGameRec.FightPower);
- officialTitleCell.InitUI(PlayerDatas.Instance.baseData.realmLevel, PlayerDatas.Instance.baseData.TitleID);
+ officialTitleCell.InitUI(PlayerDatas.Instance.baseData.realmLevel, PlayerDatas.Instance.baseData.TitleID, 0.65f);
imgMoneyIcon.SetIconWithMoneyType(ArenaManager.Instance.ChallengeMoneyType);
txtNeedCount.text = ArenaManager.Instance.NeedChallengeMoneyCnt.ToString();
}
diff --git a/Main/System/OfficialRank/OfficialTitleCell.cs b/Main/System/OfficialRank/OfficialTitleCell.cs
index 88548e5..8465430 100644
--- a/Main/System/OfficialRank/OfficialTitleCell.cs
+++ b/Main/System/OfficialRank/OfficialTitleCell.cs
@@ -104,7 +104,7 @@
}
- public void InitUI(int offcialRank, int titleID)
+ public void InitUI(int offcialRank, int titleID, float scale = 0.75f)
{
LoadPrefab(); //瀛樺湪琚嵏杞界殑鍙兘锛岄噸鏂板姞杞�
if (!TitleConfig.HasKey(titleID))
@@ -125,7 +125,8 @@
int resourceType = PhantasmPavilionManager.Instance.GetResourceType(PhantasmPavilionType.Title, titleID);
string resourceValue = PhantasmPavilionManager.Instance.GetResourceValue(PhantasmPavilionType.Title, titleID);
- PhantasmPavilionManager.Instance.Show(titleImage, effectPlayer, titleUIFrame, resourceType, resourceValue);
+ PhantasmPavilionManager.Instance.Show(PhantasmPavilionType.Title, titleImage, effectPlayer, titleUIFrame, resourceType, resourceValue);
+ titleImage.rectTransform.localScale = new Vector3(scale, scale, scale);
}
}
diff --git a/Main/System/PhantasmPavilion/AvatarCell.cs b/Main/System/PhantasmPavilion/AvatarCell.cs
index 43edb69..725f805 100644
--- a/Main/System/PhantasmPavilion/AvatarCell.cs
+++ b/Main/System/PhantasmPavilion/AvatarCell.cs
@@ -216,7 +216,7 @@
int resourceType = manager.GetResourceType(PhantasmPavilionType.FacePic, facePicID);
string resourceValue = manager.GetResourceValue(PhantasmPavilionType.FacePic, facePicID);
- manager.Show(facePicImage, facePicSpine, facePicUIFrame, resourceType, resourceValue);
+ manager.Show(PhantasmPavilionType.FacePic, facePicImage, facePicSpine, facePicUIFrame, resourceType, resourceValue);
faceBGImage.SetNativeSize();
faceImage.SetNativeSize();
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionChatBoxItem.cs b/Main/System/PhantasmPavilion/PhantasmPavilionChatBoxItem.cs
index 8d4a361..8dfb9f5 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionChatBoxItem.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionChatBoxItem.cs
@@ -39,7 +39,7 @@
int resourceType = manager.GetResourceType(type, id);
string resourceValue = manager.GetResourceValue(type, id);
- manager.Show(imgFace, spine, uiFrame, resourceType, resourceValue);
+ manager.Show(PhantasmPavilionType.ChatBox, imgFace, spine, uiFrame, resourceType, resourceValue);
if (resourceType == 1)
{
imgFace.SetNativeSize();
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionFacePicItem.cs b/Main/System/PhantasmPavilion/PhantasmPavilionFacePicItem.cs
index 35d8119..827dde1 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionFacePicItem.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionFacePicItem.cs
@@ -37,7 +37,7 @@
int resourceType = manager.GetResourceType(type, id);
string resourceValue = manager.GetResourceValue(type, id);
- manager.Show(imgFace, spine, uiFrame, resourceType, resourceValue);
+ manager.Show(PhantasmPavilionType.FacePic, imgFace, spine, uiFrame, resourceType, resourceValue);
manager.UpdateItemRedPoint(imgRed, type, id);
}
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs b/Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs
index 88c0a68..78f3c06 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs
@@ -312,7 +312,7 @@
manager.ShowFace(imgNowFacePicFace, UIEffectPlayerNowFacePicFace, uiFrameNowFacePicFace, maskNowFacePicFace, faceID);
str = AvatarHelper.GetAvatarBgColorStr(faceID);
imgNowFacePicFaceBg.SetSprite(str);
- manager.Show(imgNowFacePic, UIEffectPlayerNowFacePic, uiFrameNowFacePic, resourceType, resourceValue);
+ manager.Show(PhantasmPavilionType.FacePic, imgNowFacePic, UIEffectPlayerNowFacePic, uiFrameNowFacePic, resourceType, resourceValue);
if (resourceType == 1)
{
imgNowFacePicFace.SetNativeSize();
@@ -321,7 +321,7 @@
break;
case PhantasmPavilionType.ChatBox:
- manager.Show(imgNowChatBox, UIEffectPlayerNowChatBox, uiFrameNowChatBox, resourceType, resourceValue);
+ manager.Show(PhantasmPavilionType.ChatBox,imgNowChatBox, UIEffectPlayerNowChatBox, uiFrameNowChatBox, resourceType, resourceValue);
if (resourceType == 1)
{
imgNowChatBox.SetNativeSize();
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
index 0efa93c..983ddc8 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
@@ -234,22 +234,22 @@
var sprite = UILoader.LoadSprite("HeroHead", skinConfig.SquareIcon);
if (sprite == null)
{
- Show(imgFace, spine, uiFrame, resourceType, "herohead_default", null, ellipseMask);
+ Show(type, imgFace, spine, uiFrame, resourceType, "herohead_default", null, ellipseMask);
}
else
{
- Show(imgFace, spine, uiFrame, resourceType, string.Empty, sprite, ellipseMask);
+ Show(type, imgFace, spine, uiFrame, resourceType, string.Empty, sprite, ellipseMask);
}
}
else
{
resourceValue = GetResourceValue(type, id);
- Show(imgFace, spine, uiFrame, resourceType, resourceValue, null, ellipseMask);
+ Show(type, imgFace, spine, uiFrame, resourceType, resourceValue, null, ellipseMask);
}
}
- public void Show(ImageEx imgFace, UIEffectPlayer spine, UIFrame uiFrame, int resourceType, string resourceValue, Sprite sprite = null, EllipseMask ellipseMask = null)
+ public void Show(PhantasmPavilionType type, ImageEx imgFace, UIEffectPlayer spine, UIFrame uiFrame, int resourceType, string resourceValue, Sprite sprite = null, EllipseMask ellipseMask = null)
{
spine.Stop();
@@ -271,6 +271,12 @@
{
imgFace.overrideSprite = sprite;
}
+
+ if (type == PhantasmPavilionType.Title)
+ {
+ imgFace.SetNativeSize();
+ }
+
break;
case 2: // spine
imgFace.enabled = true;
@@ -293,13 +299,16 @@
imgFace.sprite = null;
imgFace.overrideSprite = null;
- if (!UIFrameMgr.Inst.ContainsDynamicImage(resourceValue))
- break;
- //List<UnityEngine.Sprite> spriteList = UIFrameMgr.Inst.GetDynamicImage(resourceValue);
- // if (!spriteList.IsNullOrEmpty())
- // {
- // imgFace.rectTransform.sizeDelta = new Vector2(spriteList[0].rect.width, spriteList[0].rect.height);
- // }
+ if (type == PhantasmPavilionType.Title)
+ {
+ if (!UIFrameMgr.Inst.ContainsDynamicImage(resourceValue))
+ break;
+ List<Sprite> spriteList = UIFrameMgr.Inst.GetDynamicImage(resourceValue);
+ if (!spriteList.IsNullOrEmpty())
+ {
+ imgFace.rectTransform.sizeDelta = new Vector2(spriteList[0].rect.width, spriteList[0].rect.height);
+ }
+ }
uiFrame.ResetFrame(resourceValue);
uiFrame.enabled = true;
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs b/Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs
index e1f5629..beb5433 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs
@@ -185,11 +185,8 @@
{
int resourceType = manager.GetResourceType(type, id);
string resourceValue = manager.GetResourceValue(type, id);
- manager.Show(imgNowChatBox, UIEffectPlayerNowChatBox, uiFrameNowChatBox, resourceType, resourceValue);
- if (resourceType == 1)
- {
- imgNowChatBox.SetNativeSize();
- }
+ manager.Show(PhantasmPavilionType.Title, imgNowChatBox, UIEffectPlayerNowChatBox, uiFrameNowChatBox, resourceType, resourceValue);
+
txtName.text = manager.GetName(type, id);
txtGetWayString.text = Language.Get("PhantasmPavilion06", manager.GetGetWayString(type, id));
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionTitleItem.cs b/Main/System/PhantasmPavilion/PhantasmPavilionTitleItem.cs
index 828e572..1f338ea 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionTitleItem.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionTitleItem.cs
@@ -30,7 +30,7 @@
PhantasmPavilionState state = manager.GetUnLockState(type, id);
bool isLimitedTime = manager.IsLimitTime(type, id);
- bool isUsing = manager.IsUsing(type, id);
+ bool isUsing = manager.IsUsing(type, id);
imgChoose.SetActive(manager.selectId == id);
imgBg.SetSprite(manager.selectId == id ? "ChatBoxSelect" : "ChatBoxUnSelect");
imgLimit.SetActive(state == PhantasmPavilionState.Activated && isLimitedTime);
@@ -40,12 +40,7 @@
int resourceType = manager.GetResourceType(type, id);
string resourceValue = manager.GetResourceValue(type, id);
- manager.Show(imgFace, spine, uiFrame, resourceType, resourceValue);
- if (resourceType == 1)
- {
- imgFace.SetNativeSize();
- }
-
+ manager.Show(PhantasmPavilionType.Title, imgFace, spine, uiFrame, resourceType, resourceValue);
manager.UpdateItemRedPoint(imgRed, type, id);
}
--
Gitblit v1.8.0