TITANIC: Hide any active PET text cursor when loading a savegame

This commit is contained in:
Paul Gilbert 2016-12-26 21:10:17 -05:00
parent 0e3bd1d679
commit 96c36d5398
3 changed files with 14 additions and 0 deletions

View File

@ -309,6 +309,10 @@ void CProjectItem::saveData(SimpleFile *file, CTreeItem *item) const {
void CProjectItem::preLoad() {
if (_gameManager)
_gameManager->preLoad();
CScreenManager *scrManager = CScreenManager::_currentScreenManagerPtr;
if (scrManager)
scrManager->preLoad();
}
void CProjectItem::postLoad() {

View File

@ -73,6 +73,11 @@ int CScreenManager::setFontNumber(int fontNumber) {
return oldFontNumber;
}
void CScreenManager::preLoad() {
if (_textCursor)
_textCursor->hide();
}
/*------------------------------------------------------------------------*/
OSScreenManager::OSScreenManager(TitanicEngine *vm): CScreenManager(vm),

View File

@ -228,6 +228,11 @@ public:
* Set the current font number
*/
int setFontNumber(int fontNumber);
/**
* Called when a game is about to be loaded
*/
void preLoad();
};
class OSScreenManager: CScreenManager {