diff options
-rw-r--r-- | engines/fullpipe/modal.cpp | 21 | ||||
-rw-r--r-- | engines/fullpipe/modal.h | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index 1569ee981c..2a861be2bc 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -1390,6 +1390,27 @@ void ModalQuery::update() { _cancelBtn->draw(); } +bool ModalQuery::handleMessage(ExCommand *cmd) { + if (cmd->_messageKind == 17) { + if (cmd->_messageNum == 29) { + if (_okBtn->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) { + _queryResult = 1; + + return false; + } + + if (_cancelBtn->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) + _queryResult = 0; + } else if (cmd->_messageNum == 36 && cmd->_keyCode == 27) { + _queryResult = 0; + + return false; + } + } + + return false; +} + void ModalSaveGame::setScene(Scene *sc) { warning("STUB: ModalSaveGame::setScene()"); } diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index 4b16c305aa..1babab989f 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -219,7 +219,7 @@ public: virtual ~ModalQuery(); virtual bool pollEvent() { return true; } - virtual bool handleMessage(ExCommand *message) { return false; } + virtual bool handleMessage(ExCommand *message); virtual bool init(int counterdiff) { return true; } virtual void update(); virtual void saveload() {} |