From b3237b794cc6ec4706f7b5f9f8b267c7b89d3726 Mon Sep 17 00:00:00 2001 From: Team-on Date: Fri, 14 May 2021 11:52:30 +0300 Subject: [PATCH] Fix tooltip --- Ld48/Assets/Scenes/GameplayScene.unity | 46 +++++++++++++++++++ .../TemplateSystems/UI/MouseTooltip.cs | 9 ++-- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/Ld48/Assets/Scenes/GameplayScene.unity b/Ld48/Assets/Scenes/GameplayScene.unity index afc008f..5314fec 100644 --- a/Ld48/Assets/Scenes/GameplayScene.unity +++ b/Ld48/Assets/Scenes/GameplayScene.unity @@ -480,6 +480,16 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 381861285323814708, guid: 14b6d67c72c68224c8fa3228bf8283b4, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 381861285323814708, guid: 14b6d67c72c68224c8fa3228bf8283b4, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 7052802824360423467, guid: 14b6d67c72c68224c8fa3228bf8283b4, type: 3} propertyPath: m_Name @@ -590,6 +600,36 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 8621571681407519843, guid: 14b6d67c72c68224c8fa3228bf8283b4, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8621571681407519843, guid: 14b6d67c72c68224c8fa3228bf8283b4, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8621571681407519843, guid: 14b6d67c72c68224c8fa3228bf8283b4, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8621571681407519843, guid: 14b6d67c72c68224c8fa3228bf8283b4, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8621571681407519843, guid: 14b6d67c72c68224c8fa3228bf8283b4, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8621571681407519843, guid: 14b6d67c72c68224c8fa3228bf8283b4, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 14b6d67c72c68224c8fa3228bf8283b4, type: 3} --- !u!114 &1859817387 stripped @@ -844,6 +884,12 @@ PrefabInstance: propertyPath: startItems.Array.size value: 4 objectReference: {fileID: 0} + - target: {fileID: 1078199796117548111, guid: 1623e47fde5ecd24bb071dbe08c98bc1, + type: 3} + propertyPath: startItems.Array.data[0].itemSO + value: + objectReference: {fileID: 11400000, guid: 947c1be325da72243b8e690e6685693c, + type: 2} - target: {fileID: 5969215077177768161, guid: 1623e47fde5ecd24bb071dbe08c98bc1, type: 3} propertyPath: m_RootOrder diff --git a/Ld48/Assets/Scripts/TemplateSystems/UI/MouseTooltip.cs b/Ld48/Assets/Scripts/TemplateSystems/UI/MouseTooltip.cs index 1f8ecc0..7db4a20 100644 --- a/Ld48/Assets/Scripts/TemplateSystems/UI/MouseTooltip.cs +++ b/Ld48/Assets/Scripts/TemplateSystems/UI/MouseTooltip.cs @@ -18,8 +18,6 @@ public class MouseTooltip : MonoBehaviour { [SerializeField] TextMeshProUGUI textField; [SerializeField] LayoutElement childLayoutElement; - RectTransform parentRt; - bool isShowed; #if UNITY_EDITOR @@ -35,14 +33,12 @@ private void OnValidate() { private void Awake() { cg.alpha = 0.0f; - - GameManager.Instance.tooltip = this; } private void Start() { enabled = false; - parentRt = transform.parent.GetComponent(); + GameManager.Instance.tooltip = this; } private void Update() { @@ -99,7 +95,8 @@ public void Hide() { --InventoryItemTooltip.canvasSortOrder; LeanTween.cancel(gameObject, false); - LeanTweenEx.ChangeAlpha(cg, 0.0f, 0.1f).setEase(LeanTweenType.easeInOutQuad) + LeanTweenEx.ChangeAlpha(cg, 0.0f, 0.1f) + .setEase(LeanTweenType.easeInOutQuad) .setOnComplete(() => { enabled = false; });