Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 6, 2009, 1:59:00 AM (15 years ago)
Author:
landauf
Message:

Merged gui branch back to trunk.

I did 2 small changes in IngameManager.cc on line 777 and 888 (yes, really), because const_reverse_iterator strangely doesn't work on MinGW.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/gamestates/GSIOConsole.cc

    r2087 r2896  
    3636
    3737#include "core/ConsoleCommand.h"
     38#include "core/Game.h"
    3839
    3940namespace orxonox
    4041{
    41     GSIOConsole::GSIOConsole()
    42         : GameState<GSRoot>("ioConsole")
     42    AddGameState(GSIOConsole, "ioConsole");
     43
     44    GSIOConsole::GSIOConsole(const std::string& name)
     45        : GameState(name)
    4346    {
    4447    }
     
    4851    }
    4952
    50     void GSIOConsole::enter()
     53    void GSIOConsole::activate()
    5154    {
     55        {
     56            FunctorMember<GSIOConsole>* functor = createFunctor(&GSIOConsole::loadMenu);
     57            functor->setObject(this);
     58            this->ccLoadMenu_ = createConsoleCommand(functor, "loadMenu");
     59            CommandExecutor::addConsoleCommandShortcut(this->ccLoadMenu_);
     60        }
    5261    }
    5362
    54     void GSIOConsole::leave()
     63    void GSIOConsole::deactivate()
    5564    {
     65        if (this->ccLoadMenu_)
     66        {
     67            delete this->ccLoadMenu_;
     68            this->ccLoadMenu_ = 0;
     69        }
    5670    }
    5771
    58     void GSIOConsole::ticked(const Clock& time)
     72    void GSIOConsole::update(const Clock& time)
    5973    {
     74        std::cout << ">";
    6075        std::string command;
    6176        std::getline(std::cin, command);
    6277        CommandExecutor::execute(command, true);
    63        
    64         tickChild(time);
     78    }
     79
     80    void GSIOConsole::loadMenu()
     81    {
     82        Game::getInstance().popState();
     83        Game::getInstance().requestStates("graphics, mainMenu");
    6584    }
    6685}
Note: See TracChangeset for help on using the changeset viewer.