From 007fbaf854741b41d7023f92c023af45d97d5f24 Mon Sep 17 00:00:00 2001 From: stendler <stendler@mi.fu-berlin.de> Date: Sun, 4 Feb 2018 22:15:39 +0100 Subject: [PATCH] fix containers not resetting & also reset scrollbar now that we use the containers we have to reset them and not the image/text directly. --- .../MemoryBox/arScene/Scripts/EditMemory.cs | 6 ++- Assets/MemoryBox/arScene/arScene.unity | 45 ++++++++++++------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/Assets/MemoryBox/arScene/Scripts/EditMemory.cs b/Assets/MemoryBox/arScene/Scripts/EditMemory.cs index f038d4b..3b5a7fc 100644 --- a/Assets/MemoryBox/arScene/Scripts/EditMemory.cs +++ b/Assets/MemoryBox/arScene/Scripts/EditMemory.cs @@ -12,7 +12,9 @@ namespace MemoryBox.arScene.Scripts public Text CreationDate; public Text GpsData; public Text Text; + public GameObject TextContainer; public Image Image; + public GameObject ImageContainer; public UserGps UserGps; public GameObject ButtonImage; public GameObject ButtonText; @@ -49,10 +51,10 @@ namespace MemoryBox.arScene.Scripts Name.text = "Memory #142"; CreationDate.text = timeNow.ToString(dtfi); GpsData.text = gpsData.ToString(); - Image.gameObject.SetActive(false); + ImageContainer.SetActive(false); ButtonImage.gameObject.SetActive(true); Text.text = ""; - Text.gameObject.SetActive(false); + TextContainer.SetActive(false); ButtonText.gameObject.SetActive(true); } diff --git a/Assets/MemoryBox/arScene/arScene.unity b/Assets/MemoryBox/arScene/arScene.unity index 95d0c4a..45717d1 100644 --- a/Assets/MemoryBox/arScene/arScene.unity +++ b/Assets/MemoryBox/arScene/arScene.unity @@ -448,9 +448,9 @@ RectTransform: m_Father: {fileID: 2030408298} m_RootOrder: 1 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: 311.25, y: -46} m_SizeDelta: {x: 622.49, y: 92} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &106367898 @@ -1849,9 +1849,9 @@ RectTransform: m_Father: {fileID: 2030408298} m_RootOrder: 5 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: 311.25, y: -383.5} m_SizeDelta: {x: 267, y: 35} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &368213999 @@ -4068,7 +4068,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: -5.000061, y: -10} - m_SizeDelta: {x: -203.00006, y: 0} + m_SizeDelta: {x: -203.00006, y: -100} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &780684850 MonoBehaviour: @@ -4781,6 +4781,17 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 + - m_Target: {fileID: 703509131} + m_MethodName: set_value + m_Mode: 4 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 1 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!1 &959351419 @@ -4916,8 +4927,8 @@ RectTransform: m_Father: {fileID: 402688209} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 0.48091963} + m_AnchorMax: {x: 1, y: 0.9999999} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 20} m_Pivot: {x: 0.5, y: 0.5} @@ -5521,9 +5532,9 @@ RectTransform: m_Father: {fileID: 2030408298} m_RootOrder: 4 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: 311.25, y: -290} m_SizeDelta: {x: 622.49, y: 92} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1197905905 @@ -8470,9 +8481,9 @@ RectTransform: m_Father: {fileID: 2030408298} m_RootOrder: 3 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: 311.25, y: -168} m_SizeDelta: {x: 622.49, y: 92} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1704763489 @@ -9150,7 +9161,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1738980353 MonoBehaviour: m_ObjectHideFlags: 0 @@ -9243,7 +9254,9 @@ MonoBehaviour: CreationDate: {fileID: 355555096} GpsData: {fileID: 286571124} Text: {fileID: 1613787920} + TextContainer: {fileID: 1887593735} Image: {fileID: 1539769883} + ImageContainer: {fileID: 551216364} UserGps: {fileID: 606266132} ButtonImage: {fileID: 106367896} ButtonText: {fileID: 1704763487} -- GitLab