diff options
author | Eugene Sandulenko | 2014-04-20 22:56:38 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-04-20 23:03:44 +0300 |
commit | 8f40dae91de1cc7243f882c05d03686b713687af (patch) | |
tree | e66d78c3d8e6479d9ef4a9b4282bd0a42272b643 /engines | |
parent | 3fe9d4b24ea560b34f67cac41e37dfe8900a9d43 (diff) | |
download | scummvm-rg350-8f40dae91de1cc7243f882c05d03686b713687af.tar.gz scummvm-rg350-8f40dae91de1cc7243f882c05d03686b713687af.tar.bz2 scummvm-rg350-8f40dae91de1cc7243f882c05d03686b713687af.zip |
FULLPIPE: Implement ModalQuery::handleMessage()
Diffstat (limited to 'engines')
-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() {} |