From 8f40dae91de1cc7243f882c05d03686b713687af Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 20 Apr 2014 22:56:38 +0300 Subject: FULLPIPE: Implement ModalQuery::handleMessage() --- engines/fullpipe/modal.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'engines/fullpipe/modal.cpp') 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()"); } -- cgit v1.2.3