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/fullpipe/modal.cpp | |
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/fullpipe/modal.cpp')
-rw-r--r-- | engines/fullpipe/modal.cpp | 21 |
1 files changed, 21 insertions, 0 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()"); } |