Example #1
0
        public void CloseMenu(Menus menu)
        {
            switch (menu)
            {
            case Menus.MainMenu:
                MainMenu.Close();
                CurrentMenu = null;
                break;

            case Menus.NewGameMenu:
                NewGameMenu.Close();
                CurrentMenu = null;
                break;

            case Menus.GameInfoMenu:
                GameInfoMenu.Close();
                break;

            case Menus.AdvancedSettingsMenu:
                AdvancedSettingsMenu.Close();
                break;

            case Menus.HighscoresMenu:
                HighscoresMenu.Close();
                CurrentMenu = null;
                break;

            case Menus.LoadGameMenu:
                LoadGameMenu.Close();
                CurrentMenu = null;
                break;

            case Menus.ConfirmStepWindow:
                ConfirmStepWindow.Close();
                break;

            case Menus.PlayAgainWindow:
                PlayAgainWindow.Close();
                break;

            case Menus.PauseWindow:
                PauseWindow.Close();
                CurrentMenu = null;
                break;

            case Menus.SaveGameWindow:
                SaveGameWindow.Close();
                CurrentMenu = null;
                break;

            case Menus.LoadGameWindow:
                LoadGameWindow.Close();
                CurrentMenu = null;
                break;
            }
        }
Example #2
0
        public void OpenMenu(Menus menu)
        {
            switch (menu)
            {
            case Menus.MainMenu:
                OpenMenu(MainMenu);
                break;

            case Menus.NewGameMenu:
                OpenMenu(NewGameMenu);
                break;

            case Menus.GameInfoMenu:
                GameInfoMenu.Open();
                break;

            case Menus.AdvancedSettingsMenu:
                AdvancedSettingsMenu.Open();
                break;

            case Menus.HighscoresMenu:
                OpenMenu(HighscoresMenu);
                break;

            case Menus.LoadGameMenu:
                OpenMenu(LoadGameMenu);
                break;

            case Menus.ConfirmStepWindow:
                ConfirmStepWindow.Open();
                break;

            case Menus.PlayAgainWindow:
                PlayAgainWindow.Open();
                break;

            case Menus.PauseWindow:
                OpenMenu(PauseWindow);
                break;

            case Menus.SaveGameWindow:
                OpenMenu(SaveGameWindow);
                break;

            case Menus.LoadGameWindow:
                OpenMenu(LoadGameWindow);
                break;
            }
        }