Make it so you can press escape in any place in berrydash (almost any)

This commit is contained in:
2025-10-11 12:33:47 -07:00
parent 5496a0615d
commit 07b555bbc6
9 changed files with 84 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
using TMPro;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class IconMarketplaceManager : MonoBehaviour
@@ -68,4 +70,13 @@ public class IconMarketplaceManager : MonoBehaviour
break;
}
}
async void Update()
{
if (Keyboard.current.escapeKey.wasPressedThisFrame)
{
if (downloadPanel.activeSelf || uploadPanel.activeSelf) SwitchPanel(0);
else await SceneManager.LoadSceneAsync("MainMenu");
}
}
}