void CheckResetSavedDataConfirmation(IMenu menu) { if (((ConfirmationMenu)menu).IsYesSelected == true) { // Clear settings settings.ClearSettings(); // Update the level select menu, if one is available LevelSelectMenu levelSelect = Manager.GetMenu <LevelSelectMenu>(); if (levelSelect != null) { levelSelect.SetButtonsEnabled(true); } } }
protected override void OnStateChanged(VisibilityState from, VisibilityState to) { // Call base method base.OnStateChanged(from, to); // Check if we're making this menu visible and unlocked a new level if ((from == VisibilityState.Hidden) && (to == VisibilityState.Visible) && (SceneChanger.UnlockNextLevel() == true)) { // Update the level select menu as well LevelSelectMenu levelMenu = Manager.GetMenu <LevelSelectMenu>(); if (levelMenu != null) { levelMenu.SetButtonsEnabled(true); } } }
public void OnLevelSelectClicked() { // Make sure the menu is active if (IsListeningToEvents == true) { // Open the Level Select menu LevelSelectMenu levelSelect = Manager.GetMenu <LevelSelectMenu>(); if (levelSelect != null) { levelSelect.UpdateDialog(this); levelSelect.Show(); } // Set the default UI CurrentDefaultUi = levelSelectButton; } }
void CheckResetSavedDataConfirmation(IMenu source, VisibilityState from, VisibilityState to) { if ((source is ConfirmationMenu) && (to == VisibilityState.Hidden) && (((ConfirmationMenu)source).IsYesSelected == true)) { // Clear settings Settings.ClearSettings(); // Update the start menu, if one is available StartMenu start = Manager.GetMenu <StartMenu>(); if (start != null) { start.SetupStartButton(); } // Update the level select menu, if one is available LevelSelectMenu levelSelect = Manager.GetMenu <LevelSelectMenu>(); if (levelSelect != null) { levelSelect.SetButtonsEnabled(true); } } }