Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 25, 2009, 11:53:04 PM (15 years ago)
Author:
rgrieder
Message:
  • Started working on cleaning up the GameState mess ;)
  • Cleaned out GUIManager
  • Renamed GSGUI to GSMainMenu
  • "—state blah" has been changed to —server, —client, —standalone, —dedicated
  • —console starts the game in the console (no level loading there yet, but "loadMenu")
  • adjusted run scripts
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/gamestates/GSIOConsole.cc

    r2844 r2850  
    5353    void GSIOConsole::activate()
    5454    {
     55        {
     56            FunctorMember<GSIOConsole>* functor = createFunctor(&GSIOConsole::loadMenu);
     57            functor->setObject(this);
     58            this->ccLoadMenu_ = createConsoleCommand(functor, "loadMenu");
     59            CommandExecutor::addConsoleCommandShortcut(this->ccLoadMenu_);
     60        }
    5561    }
    5662
    5763    void GSIOConsole::deactivate()
    5864    {
     65        if (this->ccLoadMenu_)
     66        {
     67            delete this->ccLoadMenu_;
     68            this->ccLoadMenu_ = 0;
     69        }
    5970    }
    6071
    6172    void GSIOConsole::update(const Clock& time)
    6273    {
     74        std::cout << ">";
    6375        std::string command;
    6476        std::getline(std::cin, command);
    6577        CommandExecutor::execute(command, true);
    6678    }
     79
     80    void GSIOConsole::loadMenu()
     81    {
     82        Game::getInstance().popState();
     83        Game::getInstance().requestStates("graphics, mainMenu");
     84    }
    6785}
Note: See TracChangeset for help on using the changeset viewer.