コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
        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);
                }
            }
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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);
                }
            }
        }