Make R act as the refresh button in the icon marketplace download menu

This commit is contained in:
2026-01-31 20:36:12 -07:00
parent 7af1a7c329
commit fefab71818
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
private string statusMessage; private string statusMessage;
private Coroutine statusRoutine; private Coroutine statusRoutine;
public AudioSource iconPurchaseSound; public AudioSource iconPurchaseSound;
[SerializeField] private Button refreshButton; [SerializeField] internal Button refreshButton;
[SerializeField] private Button optionsButton; [SerializeField] private Button optionsButton;
[SerializeField] internal GameObject optionsPanel; [SerializeField] internal GameObject optionsPanel;
[SerializeField] internal Button optionsPanelSubmitButton; [SerializeField] internal Button optionsPanelSubmitButton;
@@ -120,7 +120,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
balanceText.text = Tools.FormatWithCommas(BazookaManager.Instance.GetCustomBirdIconData().Balance); balanceText.text = Tools.FormatWithCommas(BazookaManager.Instance.GetCustomBirdIconData().Balance);
} }
async void GetIcons() internal async void GetIcons()
{ {
refreshButton.interactable = false; refreshButton.interactable = false;
optionsButton.interactable = false; optionsButton.interactable = false;

View File

@@ -81,5 +81,6 @@ public class IconMarketplaceManager : MonoBehaviour
else if (downloadPanel.activeSelf || uploadPanel.activeSelf) SwitchPanel(0); else if (downloadPanel.activeSelf || uploadPanel.activeSelf) SwitchPanel(0);
else await SceneManager.LoadSceneAsync("MainMenu"); else await SceneManager.LoadSceneAsync("MainMenu");
} }
else if (Keyboard.current.rKey.wasPressedThisFrame && downloadPanel.activeSelf && downloadPanelScript.refreshButton.interactable) downloadPanelScript.GetIcons();
} }
} }