Make POP vs PopAndPush slightly more explicit

ButtonTriggerViewTransition
This commit is contained in:
alexiscatnip
2022-02-06 13:03:21 +08:00
parent f4709ff464
commit 07273825d5
+4 -3
View File
@@ -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<UIService>().ScreensManager.PopCanvas();
return;
}
if (popCurrent)
if (popAndPush)
{
ServiceLocator.Instance.Get<UIService>().ScreensManager.PopAndPush(canvasTypeToPush);
} else