Reset button for options menu

This commit is contained in:
2025-08-31 09:07:06 -07:00
parent f18a6fe7f9
commit 862026e760
2 changed files with 373 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
public Button optionsButton;
public GameObject optionsPanel;
public Button optionsPanelSubmitButton;
public Button optionsPanelResetButton;
public TMP_Dropdown optionsPanelSortByDropdown;
public Toggle optionsPanelPriceRangeToggle;
public TMP_InputField optionsPanelPriceRangeMinInput;
@@ -53,6 +54,13 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
GetIcons();
}
});
optionsPanelResetButton.onClick.AddListener(() =>
{
anyChanges = true;
optionsPanelSortByDropdown.value = 3;
optionsPanelPriceRangeToggle.isOn = false;
optionsPanelSearchForToggle.isOn = false;
});
optionsPanelPriceRangeToggle.onValueChanged.AddListener((on) =>
{