Fix escape key in options panel of icon marketplace download menu

This commit is contained in:
Lncvrt committed 2026-01-22 22:51:57 -07:00
1 parent e7a21b837f
commit 333e1e0a35
2 files changed
+4 -3

No files matched your search

@@ -24,8 +24,8 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
public AudioSource iconPurchaseSound;
[SerializeField] private Button refreshButton;
[SerializeField] private Button optionsButton;
[SerializeField] private GameObject optionsPanel;
[SerializeField] private Button optionsPanelSubmitButton;
[SerializeField] internal GameObject optionsPanel;
[SerializeField] internal Button optionsPanelSubmitButton;
[SerializeField] private Button optionsPanelResetButton;
public TMP_Dropdown optionsPanelSortByDropdown;
@@ -75,7 +75,8 @@ public class IconMarketplaceManager : MonoBehaviour
{
if (Keyboard.current.escapeKey.wasPressedThisFrame)
{
if (downloadPanel.activeSelf || uploadPanel.activeSelf) SwitchPanel(0);
if (downloadPanelScript.optionsPanel.activeSelf) downloadPanelScript.optionsPanelSubmitButton.onClick.Invoke();
else if (downloadPanel.activeSelf || uploadPanel.activeSelf) SwitchPanel(0);
else await SceneManager.LoadSceneAsync("MainMenu");
}
}