TITANIC: Make Esc at the start-up dialog quit the game

I.e. the dialog you get if you have saved games, where the game asks you
if you want to load or start a new game. Before, it would just make the
dialog unresponsive if you pressed Esc.
This commit is contained in:
Torbjörn Andersson 2021-06-11 07:57:23 +02:00
parent e12c0f3f4e
commit b09968768a
3 changed files with 6 additions and 6 deletions

View File

@ -54,7 +54,7 @@ CMainGameWindow::~CMainGameWindow() {
delete _project;
}
void CMainGameWindow::applicationStarting() {
bool CMainGameWindow::applicationStarting() {
// Set the video mode
CScreenManager *screenManager = CScreenManager::setCurrent();
screenManager->setMode(640, 480, 16, 0, true);
@ -79,8 +79,8 @@ void CMainGameWindow::applicationStarting() {
// Set up the game project, and get game slot
int saveSlot = getSavegameSlot();
if (saveSlot == -2)
return;
if (saveSlot == EXIT_GAME)
return false;
// Create game view and manager
_gameView = new CSTGameView(this);
@ -107,6 +107,7 @@ void CMainGameWindow::applicationStarting() {
enterRoomMsg.execute(room, nullptr, MSGFLAG_SCAN);
_gameManager->markAllDirty();
return true;
}
int CMainGameWindow::getSavegameSlot() {

View File

@ -114,7 +114,7 @@ public:
/**
* Called when the application starts
*/
void applicationStarting();
bool applicationStarting();
/**
* Sets the view to be shown

View File

@ -115,8 +115,7 @@ bool TitanicEngine::initialize() {
syncSoundSettings();
_window->applicationStarting();
return true;
return _window->applicationStarting();
}
void TitanicEngine::deinitialize() {