Reset options menu data when exiting download menu

This commit is contained in:
2025-08-31 09:08:20 -07:00
parent 862026e760
commit ad1e14b54c
2 changed files with 10 additions and 6 deletions

View File

@@ -31,14 +31,14 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
public TMP_InputField optionsPanelSearchForInputField; public TMP_InputField optionsPanelSearchForInputField;
public AudioSource iconPurchaseSound; public AudioSource iconPurchaseSound;
private bool priceRangeEnabled = false; internal bool priceRangeEnabled = false;
private string priceRangeMin = "10"; internal string priceRangeMin = "10";
private string priceRangeMax = "250"; internal string priceRangeMax = "250";
private bool searchForEnabled = false; internal bool searchForEnabled = false;
private string searchForValue = ""; internal string searchForValue = "";
private bool anyChanges = false; internal bool anyChanges = false;
void Awake() void Awake()
{ {

View File

@@ -34,6 +34,10 @@ public class IconMarketplaceManager : MonoBehaviour
internal void SwitchPanel(int panelIndex) internal void SwitchPanel(int panelIndex)
{ {
downloadPanelScript.iconPurchaseSound.Stop(); downloadPanelScript.iconPurchaseSound.Stop();
downloadPanelScript.anyChanges = true;
downloadPanelScript.optionsPanelSortByDropdown.value = 3;
downloadPanelScript.optionsPanelPriceRangeToggle.isOn = false;
downloadPanelScript.optionsPanelSearchForToggle.isOn = false;
switch (panelIndex) switch (panelIndex)
{ {
case 0: case 0: