SHERLOCK: RT: Don't allow saving when credits are active

This commit is contained in:
Paul Gilbert 2015-08-08 11:42:25 -04:00
parent 5c1fbaff4b
commit e9455457a8
2 changed files with 10 additions and 0 deletions

View File

@ -194,6 +194,11 @@ void TattooEngine::saveConfig() {
ConfMan.flushToDisk();
}
bool TattooEngine::canSaveGameStateCurrently() {
TattooUserInterface &ui = *(TattooUserInterface *)_ui;
return _canLoadSave && !ui._creditsWidget.active();
}
} // End of namespace Tattoo
} // End of namespace Sherlock

View File

@ -101,6 +101,11 @@ public:
* Save the game configuration
*/
virtual void saveConfig();
/**
* Returns true if the game can be saved
*/
virtual bool canSaveGameStateCurrently();
};
} // End of namespace Tattoo