From b331d3a8c8311be1acd732e04e06182c59d36c46 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Thu, 9 Jan 2025 09:17:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=90=E7=BB=A9=E6=98=BE?= =?UTF-8?q?=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Art/UIPrefab/UIRightTop.prefab | 22 +++++++++++----------- Assets/Scripts/UI/UIRightTop.cs | 12 +++++++----- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Assets/Art/UIPrefab/UIRightTop.prefab b/Assets/Art/UIPrefab/UIRightTop.prefab index 887a2420..4e719eef 100644 --- a/Assets/Art/UIPrefab/UIRightTop.prefab +++ b/Assets/Art/UIPrefab/UIRightTop.prefab @@ -429,9 +429,9 @@ RectTransform: m_Children: [] m_Father: {fileID: 2505519175557592291} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 16, y: -16} m_SizeDelta: {x: 32, y: 32} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1402148308183576929 @@ -838,7 +838,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &2505519175557592291 RectTransform: m_ObjectHideFlags: 0 @@ -855,10 +855,10 @@ RectTransform: - {fileID: 3064490650672719453} m_Father: {fileID: 906599229421366858} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 583.3438, y: -35.5} + m_SizeDelta: {x: 68, y: 32} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &4014962916602461336 MonoBehaviour: @@ -1507,9 +1507,9 @@ RectTransform: m_Children: [] m_Father: {fileID: 2505519175557592291} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 50, y: -16} m_SizeDelta: {x: 36, y: 18} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7242127381975158959 diff --git a/Assets/Scripts/UI/UIRightTop.cs b/Assets/Scripts/UI/UIRightTop.cs index c4af2640..e1894d4d 100644 --- a/Assets/Scripts/UI/UIRightTop.cs +++ b/Assets/Scripts/UI/UIRightTop.cs @@ -60,16 +60,18 @@ namespace QFramework.Example protected override void OnOpen(IUIData uiData = null) { Title.text = Global.Instance.curModule.ModuleName; - - switch (Global.Instance.curModule.type) + switch (Global.appTpe) { - case "All": - case "Exam": + case Global.AppType.UnKnow: + break; + case Global.AppType.Study: Score.gameObject.SetActive(true); break; - default: + case Global.AppType.Exam: Score.gameObject.SetActive(false); break; + case Global.AppType.All: + break; } }