Beispiel #1
0
void Game::mainMenu() {
	EventMan.flushEvents();

	MainMenu menu(*_module, _console);

	_console->disableCommand("loadmodule", "not available in the main menu");
	_console->disableCommand("exitmodule", "not available in the main menu");

	menu.show();
	playMenuMusic();
	menu.run();
	stopMenuMusic();
	menu.hide();

	_console->enableCommand("loadmodule");
	_console->enableCommand("exitmodule");
}
Beispiel #2
0
void Game::mainMenu(bool playStartSound, bool showLegal) {
	playMenuMusic();

	if (playStartSound)
		playSound("gui_prompt", Sound::kSoundTypeSFX);

	EventMan.flushEvents();

	MainMenu menu(*_module, _console);

	if (showLegal) {
		// Fade in, show and fade out the legal billboard

		Legal legal;

		legal.fadeIn();
		menu.show();
		legal.show();
	} else
		menu.show();

	_console->disableCommand("loadcampaign", "not available in the main menu");
	_console->disableCommand("loadmodule"  , "not available in the main menu");
	_console->disableCommand("exitmodule"  , "not available in the main menu");
	_console->disableCommand("listareas"   , "not available in the main menu");
	_console->disableCommand("gotoarea"    , "not available in the main menu");

	menu.run();

	_console->enableCommand("loadcampaign");
	_console->enableCommand("loadmodule");
	_console->enableCommand("exitmodule");
	_console->enableCommand("listareas");
	_console->enableCommand("gotoarea");

	menu.hide();

	stopMenuMusic();
}