Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 27, 2009, 10:17:54 PM (15 years ago)
Author:
scheusso
Message:

console commands for switching back to MainMenu from Game mode

Location:
code/branches/core5/src/modules/gamestates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/gamestates/GSMainMenu.cc

    r5799 r5817  
    9999            CommandExecutor::addConsoleCommandShortcut(this->ccStartDedicated_);
    100100        }
     101        {
     102            FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startMainMenu);
     103            functor->setObject(this);
     104            this->ccStartMainMenu_ = createConsoleCommand(functor, "startMainMenu");
     105            CommandExecutor::addConsoleCommandShortcut(this->ccStartMainMenu_);
     106        }
    101107
    102108        InputManager::getInstance().enterState("mainMenu");
     
    156162        Game::getInstance().requestStates("dedicated, level");
    157163    }
     164    void GSMainMenu::startMainMenu()
     165    {
     166        // HACK - HACK
     167        Game::getInstance().popState();
     168        Game::getInstance().popState();
     169        Game::getInstance().requestStates("mainmenu");
     170    }
    158171}
  • code/branches/core5/src/modules/gamestates/GSMainMenu.h

    r5738 r5817  
    5151        void startClient();
    5252        void startDedicated();
     53        void startMainMenu();
    5354
    5455    private:
     
    6263        ConsoleCommand* ccStartClient_;
    6364        ConsoleCommand* ccStartDedicated_;
     65        ConsoleCommand* ccStartMainMenu_;
    6466
    6567        // ambient sound for the main menu
Note: See TracChangeset for help on using the changeset viewer.