Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 25, 2009, 5:33:58 PM (15 years ago)
Author:
rgrieder
Message:
  • Moved some code from Game to Main and GSRoot
  • Renamed "gui" GameState to "mainMenu"
File:
1 edited

Legend:

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

    r2844 r2845  
    3434#include "core/Clock.h"
    3535#include "core/Core.h"
     36#include "core/CommandLine.h"
    3637#include "core/ConsoleCommand.h"
    3738#include "tools/TimeFactorListener.h"
     
    4344{
    4445    AddGameState(GSRoot, "root");
     46    SetCommandLineSwitch(startWithConsole);
    4547
    4648    GSRoot::GSRoot(const std::string& name)
     
    7880            CommandExecutor::addConsoleCommandShortcut(this->ccPause_).accessLevel(AccessLevel::Offline);
    7981        }
     82
     83        // Determine where to start
     84        if (CommandLine::getValue("startWithConsole").getBool())
     85        {
     86            // Start the game in the console
     87            Game::getInstance().requestState("ioConsole");
     88        }
     89        else
     90        {
     91            // Start in GUI main menu
     92            Game::getInstance().requestState("graphics");
     93            Game::getInstance().requestState("mainMenu");
     94        }
     95
    8096    }
    8197
Note: See TracChangeset for help on using the changeset viewer.