diff --git a/Assets/Art/UIPrefab/UIBody3D.prefab b/Assets/Art/UIPrefab/UIBody3D.prefab index 8ef14b96..a583df78 100644 --- a/Assets/Art/UIPrefab/UIBody3D.prefab +++ b/Assets/Art/UIPrefab/UIBody3D.prefab @@ -2648,7 +2648,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} m_AnchoredPosition: {x: 78.2, y: -218.5} - m_SizeDelta: {x: 110, y: 478} + m_SizeDelta: {x: 110, y: 425.2936} m_Pivot: {x: 0.49999964, y: 0.0000000121071935} --- !u!222 &4610696393774473950 CanvasRenderer: @@ -5690,7 +5690,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &2899870530208733792 RectTransform: m_ObjectHideFlags: 0 @@ -6027,18 +6027,19 @@ MonoBehaviour: PicBtn: {fileID: 7355533366755456900} BgBtn: {fileID: 6782086177789542834} LikeBtn: {fileID: 509066767672172492} + HideAll: {fileID: 7062404923007037839} BgSelect: {fileID: 8495941726259502085} White: {fileID: 3385460087621993111} Black: {fileID: 6843517907583295136} Grey: {fileID: 8664323365780676703} Gradient: {fileID: 8764276824174293146} - HideAll: {fileID: 7062404923007037839} RightContent: {fileID: 7012541589931891369} BodyList: {fileID: 7473498730775191750} BodyContent: {fileID: 8535905247929421360} MenuBtn: {fileID: 8217181496106074158} CloseBtn: {fileID: 3816761972491639292} TitleName: {fileID: 4753662552052665936} + RightBottom: {fileID: 33484139944297363} RotMode: {fileID: 7963581892213722852} LineMode: {fileID: 8644876331141729179} LockMode: {fileID: 1364993364087250846} @@ -7509,7 +7510,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &7255839356631455979 RectTransform: m_ObjectHideFlags: 0 @@ -7526,9 +7527,9 @@ RectTransform: - {fileID: 6722878613584790130} m_Father: {fileID: 755010573038241708} 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: 35, y: -370.40002} m_SizeDelta: {x: 52, y: 52} m_Pivot: {x: 0.5, y: 1} --- !u!222 &3289308654276258587 @@ -10842,6 +10843,8 @@ GameObject: - component: {fileID: 8889153922550987783} - component: {fileID: 33484139944297363} - component: {fileID: 2081395510182911578} + - component: {fileID: 8123229884452079384} + - component: {fileID: 7611722453853550742} m_Layer: 0 m_Name: RightBottom m_TagString: Untagged @@ -10869,8 +10872,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -19.5, y: 46.1} - m_SizeDelta: {x: 460, y: 52} + m_AnchoredPosition: {x: -19.5, y: 46.100006} + m_SizeDelta: {x: 385.4182, y: 52} m_Pivot: {x: 1.0000001, y: 0.4999998} --- !u!222 &8889153922550987783 CanvasRenderer: @@ -10936,6 +10939,130 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!114 &8123229884452079384 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8498749760227293931} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d0390bd8b8ffd640b34fe25065ff1df, type: 3} + m_Name: + m_EditorClassIdentifier: + updateType: 0 + isSpeedBased: 0 + hasOnStart: 0 + hasOnPlay: 0 + hasOnUpdate: 0 + hasOnStepComplete: 0 + hasOnComplete: 0 + hasOnTweenCreated: 0 + hasOnRewind: 0 + onStart: + m_PersistentCalls: + m_Calls: [] + onPlay: + m_PersistentCalls: + m_Calls: [] + onUpdate: + m_PersistentCalls: + m_Calls: [] + onStepComplete: + m_PersistentCalls: + m_Calls: [] + onComplete: + m_PersistentCalls: + m_Calls: [] + onTweenCreated: + m_PersistentCalls: + m_Calls: [] + onRewind: + m_PersistentCalls: + m_Calls: [] + targetIsSelf: 1 + targetGO: {fileID: 0} + tweenTargetIsTargetGO: 1 + delay: 0 + duration: 0.3 + easeType: 6 + easeCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + loopType: 0 + loops: 1 + id: + isRelative: 0 + isFrom: 0 + isIndependentUpdate: 0 + autoKill: 0 + autoGenerate: 1 + isActive: 1 + isValid: 1 + target: {fileID: 7288756047650164559} + animationType: 1 + targetType: 5 + forcedTargetType: 0 + autoPlay: 0 + useTargetAsV3: 0 + endValueFloat: 0 + endValueV3: {x: 450, y: 46, z: 0} + endValueV2: {x: 0, y: 0} + endValueColor: {r: 1, g: 1, b: 1, a: 1} + endValueString: + endValueRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + endValueTransform: {fileID: 0} + optionalBool0: 0 + optionalBool1: 0 + optionalFloat0: 0 + optionalInt0: 0 + optionalRotationMode: 0 + optionalScrambleMode: 0 + optionalShakeRandomnessMode: 0 + optionalString: +--- !u!114 &7611722453853550742 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8498749760227293931} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3} + m_Name: + m_EditorClassIdentifier: + MarkType: 0 + CustomComponentName: + CustomComment: + mComponentName: UnityEngine.UI.Image --- !u!1 &8530701362379009178 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/UI/UIBody3D.Designer.cs b/Assets/Scripts/UI/UIBody3D.Designer.cs index 0993b1bf..28c1223e 100644 --- a/Assets/Scripts/UI/UIBody3D.Designer.cs +++ b/Assets/Scripts/UI/UIBody3D.Designer.cs @@ -5,7 +5,7 @@ using QFramework; namespace QFramework.Example { - // Generate Id:3d26edd2-71c3-4899-bb23-6674108be2c7 + // Generate Id:1321b2ec-18de-4df0-aa60-42b84a8c6e49 public partial class UIBody3D { public const string Name = "UIBody3D"; @@ -35,6 +35,8 @@ namespace QFramework.Example [SerializeField] public UnityEngine.UI.Button LikeBtn; [SerializeField] + public UnityEngine.UI.Toggle HideAll; + [SerializeField] public UnityEngine.UI.Image BgSelect; [SerializeField] public UnityEngine.UI.Toggle White; @@ -45,8 +47,6 @@ namespace QFramework.Example [SerializeField] public UnityEngine.UI.Toggle Gradient; [SerializeField] - public UnityEngine.UI.Toggle HideAll; - [SerializeField] public RectTransform RightContent; [SerializeField] public RectTransform BodyList; @@ -59,6 +59,8 @@ namespace QFramework.Example [SerializeField] public TMPro.TextMeshProUGUI TitleName; [SerializeField] + public UnityEngine.UI.Image RightBottom; + [SerializeField] public UnityEngine.UI.Toggle RotMode; [SerializeField] public UnityEngine.UI.Toggle LineMode; @@ -87,18 +89,19 @@ namespace QFramework.Example PicBtn = null; BgBtn = null; LikeBtn = null; + HideAll = null; BgSelect = null; White = null; Black = null; Grey = null; Gradient = null; - HideAll = null; RightContent = null; BodyList = null; BodyContent = null; MenuBtn = null; CloseBtn = null; TitleName = null; + RightBottom = null; RotMode = null; LineMode = null; LockMode = null; diff --git a/Assets/Scripts/UI/UIBody3D.cs b/Assets/Scripts/UI/UIBody3D.cs index 09963fdf..0fd0b1b1 100644 --- a/Assets/Scripts/UI/UIBody3D.cs +++ b/Assets/Scripts/UI/UIBody3D.cs @@ -127,6 +127,7 @@ namespace QFramework.Example HideAll.transform.SetAsFirstSibling(); }); RightContent.GetComponent().DORestart(); + RightBottom.GetComponent().DORestart(); HideAll.transform.Find("Label").GetComponent().text = "ÏÔʾ"; } else @@ -139,6 +140,7 @@ namespace QFramework.Example LeftBg.GetComponent().enabled = false; }); RightContent.GetComponent().DOPlayBackwards(); + RightBottom.GetComponent().DOPlayBackwards(); HideAll.transform.Find("Label").GetComponent().text = "Òþ²Ø"; } @@ -421,7 +423,6 @@ namespace QFramework.Example bodyItem.transform.Find("Content/Btns").gameObject.SetActive(false); bodyItem.transform.Find("Content/Label").GetComponent().text = body.Name; var bodyToggle = bodyItem.GetComponent(); - bodyToggle.isOn = body.isShow; GameObject obj = Utility.FindObj(body.Path); obj.SetActive(body.isShow); bodyToggle.onValueChanged.AddListener(isOn => @@ -429,6 +430,7 @@ namespace QFramework.Example SetAllChildren(obj.transform, isOn); obj.SetActive(isOn); }); + bodyToggle.isOn = body.isShow; var iconImg = bodyItem.transform.Find("Icon").GetComponent(); LoadIcon(body.Icon, body, iconImg); } @@ -472,7 +474,7 @@ namespace QFramework.Example } - public void SetAllChildren(Transform parent, bool isOn) + public void SetAllChildren(Transform parent, bool isOn) { for (int i = 0; i < parent.childCount; i++) { diff --git a/Assets/Scripts/UI/UIBody3DMenuTree.cs b/Assets/Scripts/UI/UIBody3DMenuTree.cs index e47c74c0..4a513713 100644 --- a/Assets/Scripts/UI/UIBody3DMenuTree.cs +++ b/Assets/Scripts/UI/UIBody3DMenuTree.cs @@ -348,6 +348,7 @@ namespace QFramework.Example for (int i = 0; i < parent.childCount; i++) { Transform child = parent.GetChild(i); + Transform subContent = child.Find("SubContent"); Transform labelTransform = child.Find("Content/Toggle/Content/Label"); if (labelTransform != null) { @@ -359,7 +360,6 @@ namespace QFramework.Example { GameObject clone = GameObject.Instantiate(SearchItem.gameObject, SearchContent); searchItemMap.Add(clone, child.gameObject); - Transform subContent = child.Find("SubContent"); Button btn = clone.transform.Find("Button").GetComponent