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/PhantasmPavilionManager.cs | 31 ++++++++++++++++++++-----------
1 files changed, 20 insertions(+), 11 deletions(-)
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;
--
Gitblit v1.8.0