From 07273825d5e5519a913ece7afa93e71c72f8e298 Mon Sep 17 00:00:00 2001 From: alexiscatnip Date: Sun, 6 Feb 2022 13:03:21 +0800 Subject: [PATCH] Make POP vs PopAndPush slightly more explicit ButtonTriggerViewTransition --- Assets/ButtonTriggerViewTransition.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/ButtonTriggerViewTransition.cs b/Assets/ButtonTriggerViewTransition.cs index d4403c8..55e66fd 100644 --- a/Assets/ButtonTriggerViewTransition.cs +++ b/Assets/ButtonTriggerViewTransition.cs @@ -6,6 +6,7 @@ using Raindrop; using Raindrop.ServiceLocator; using Raindrop.Services; using UnityEngine; +using UnityEngine.Serialization; using UnityEngine.UI; using Logger = OpenMetaverse.Logger; @@ -13,7 +14,7 @@ using Logger = OpenMetaverse.Logger; public class ButtonTriggerViewTransition : MonoBehaviour { public CanvasType canvasTypeToPush; - public bool popCurrent; + [FormerlySerializedAs("popCurrent")] public bool popAndPush; private void Start() { try @@ -35,13 +36,13 @@ public class ButtonTriggerViewTransition : MonoBehaviour private void OnClick() { - if (canvasTypeToPush == CanvasType.NONE) + if (canvasTypeToPush == CanvasType.POP) { ServiceLocator.Instance.Get().ScreensManager.PopCanvas(); return; } - if (popCurrent) + if (popAndPush) { ServiceLocator.Instance.Get().ScreensManager.PopAndPush(canvasTypeToPush); } else