Fix escape key in options panel of icon marketplace download menu
This commit is contained in:
@@ -24,8 +24,8 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
|||||||
public AudioSource iconPurchaseSound;
|
public AudioSource iconPurchaseSound;
|
||||||
[SerializeField] private Button refreshButton;
|
[SerializeField] private Button refreshButton;
|
||||||
[SerializeField] private Button optionsButton;
|
[SerializeField] private Button optionsButton;
|
||||||
[SerializeField] private GameObject optionsPanel;
|
[SerializeField] internal GameObject optionsPanel;
|
||||||
[SerializeField] private Button optionsPanelSubmitButton;
|
[SerializeField] internal Button optionsPanelSubmitButton;
|
||||||
[SerializeField] private Button optionsPanelResetButton;
|
[SerializeField] private Button optionsPanelResetButton;
|
||||||
|
|
||||||
public TMP_Dropdown optionsPanelSortByDropdown;
|
public TMP_Dropdown optionsPanelSortByDropdown;
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ public class IconMarketplaceManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (Keyboard.current.escapeKey.wasPressedThisFrame)
|
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");
|
else await SceneManager.LoadSceneAsync("MainMenu");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user