diff options
author | Eugene Sandulenko | 2019-07-02 11:40:04 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:08 +0200 |
commit | 6247f1ebec805205758d03d6107ae0ee3c4bce50 (patch) | |
tree | 47819cde8624bade37cd59ac807352fa6126206f /engines/hdb | |
parent | dcce09471d348a37fa22f072951aaa1053c79b00 (diff) | |
download | scummvm-rg350-6247f1ebec805205758d03d6107ae0ee3c4bce50.tar.gz scummvm-rg350-6247f1ebec805205758d03d6107ae0ee3c4bce50.tar.bz2 scummvm-rg350-6247f1ebec805205758d03d6107ae0ee3c4bce50.zip |
HDB: Implement Window::closeAll()
Now the player is not locked when pressing ESC with dialog on screen
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/ai-cinematic.cpp | 4 | ||||
-rw-r--r-- | engines/hdb/window.cpp | 7 | ||||
-rw-r--r-- | engines/hdb/window.h | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp index bda993d0f1..58287a8153 100644 --- a/engines/hdb/ai-cinematic.cpp +++ b/engines/hdb/ai-cinematic.cpp @@ -404,7 +404,9 @@ void AI::cineAbort() { if (_cine[i]->cmdType == C_STARTMAP || _cine[i]->cmdType == C_STOPCINE) _cine[0] = _cine[i]; } - warning("STUB: Window: closeAll() required"); + + g_hdb->_window->closeAll(); + if (_player) stopEntity(_player); _cineAborted = true; diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp index 0b26a21b41..5d5b7d3bda 100644 --- a/engines/hdb/window.cpp +++ b/engines/hdb/window.cpp @@ -116,6 +116,13 @@ void Window::checkPause(uint x, uint y) { } } +void Window::closeAll() { + closeDialog(); + closeDialogChoice(); + closeMsg(); + closeTextOut(); +} + void Window::openDialog(const char *title, int tileIndex, const char *string, int more, const char *luaMore) { if (_dialogInfo.active) return; diff --git a/engines/hdb/window.h b/engines/hdb/window.h index e03e26f147..b74f5eedd7 100644 --- a/engines/hdb/window.h +++ b/engines/hdb/window.h @@ -135,6 +135,8 @@ public: void restartSystem(); void setInfobarDark(int value); + void closeAll(); + // Pause Functions void drawPause(); void checkPause(uint x, uint y); |