diff options
| author | Nipun Garg | 2019-06-29 02:05:40 +0530 |
|---|---|---|
| committer | Eugene Sandulenko | 2019-09-03 17:17:04 +0200 |
| commit | 568ec34994873779eecd5f36e7e09e6a7d6c7878 (patch) | |
| tree | a56af3390719d5aed5d9c9ab841f6827286d6f23 /engines | |
| parent | a607dd1bcd7859e2da599414be0d2d97e642cd87 (diff) | |
| download | scummvm-rg350-568ec34994873779eecd5f36e7e09e6a7d6c7878.tar.gz scummvm-rg350-568ec34994873779eecd5f36e7e09e6a7d6c7878.tar.bz2 scummvm-rg350-568ec34994873779eecd5f36e7e09e6a7d6c7878.zip | |
HDB: Add drawPause() and checkPause()
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/hdb/window.cpp | 12 | ||||
| -rw-r--r-- | engines/hdb/window.h | 7 |
2 files changed, 18 insertions, 1 deletions
diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp index ba7575c688..5532ccd466 100644 --- a/engines/hdb/window.cpp +++ b/engines/hdb/window.cpp @@ -96,6 +96,18 @@ void Window::setInfobarDark(int value) { _infobarDimmed = value; } +void Window::drawPause() { + if (g_hdb->getPause()) + _gfxPausePlaque->drawMasked(480 / 2 - _gfxPausePlaque->_width / 2, kPauseY); +} + +void Window::checkPause(uint x, uint y) { + if (x >= 480 / 2 - _gfxPausePlaque->_width / 2 && 480 / 2 + _gfxPausePlaque->_width / 2 > x && y >= kPauseY && y < kPauseY + _gfxPausePlaque->_height) { + g_hdb->togglePause(); + warning("STUB: checkPause: Play SND_POP"); + } +} + 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 27e37420d2..b017c4c8fd 100644 --- a/engines/hdb/window.h +++ b/engines/hdb/window.h @@ -33,7 +33,8 @@ enum { kInvItemSpaceX = 48, kInvItemSpaceY = 40, kInvItemPerLine = 3, - kTextOutCenterX = ((kScreenWidth - kTileWidth * 5) / 2) + kTextOutCenterX = ((kScreenWidth - kTileWidth * 5) / 2), + kPauseY = (kScreenHeight / 2 - 64) }; struct DialogInfo { @@ -77,6 +78,10 @@ public: void restartSystem(); void setInfobarDark(int value); + // Pause Functions + void drawPause(); + void checkPause(uint x, uint y); + // Dialog Functions void openDialog(const char *title, int tileIndex, const char *string, int more, const char *luaMore); |
