From 333e1e0a35e0c4fc4423512f9a4ddcfab1f5f739 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Thu, 22 Jan 2026 22:50:37 -0700 Subject: [PATCH] Fix escape key in options panel of icon marketplace download menu --- Assets/Scripts/IconMarketplace/IconMarketplaceDownloadIcon.cs | 4 ++-- Assets/Scripts/IconMarketplace/IconMarketplaceManager.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/IconMarketplace/IconMarketplaceDownloadIcon.cs b/Assets/Scripts/IconMarketplace/IconMarketplaceDownloadIcon.cs index f43248f..5f9628d 100644 --- a/Assets/Scripts/IconMarketplace/IconMarketplaceDownloadIcon.cs +++ b/Assets/Scripts/IconMarketplace/IconMarketplaceDownloadIcon.cs @@ -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; diff --git a/Assets/Scripts/IconMarketplace/IconMarketplaceManager.cs b/Assets/Scripts/IconMarketplace/IconMarketplaceManager.cs index bcbfac6..da41108 100644 --- a/Assets/Scripts/IconMarketplace/IconMarketplaceManager.cs +++ b/Assets/Scripts/IconMarketplace/IconMarketplaceManager.cs @@ -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"); } }