diff options
-rw-r--r-- | engines/fullpipe/modal.cpp | 12 | ||||
-rw-r--r-- | engines/fullpipe/modal.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index 83ebdd6ef3..dbbd7beeb2 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -1629,6 +1629,18 @@ bool ModalSaveGame::getFileInfo(char *filename, FileInfo *fileinfo) { return false; } +bool ModalSaveGame::handleMessage(ExCommand *cmd) { + if (_queryDlg) + return _queryDlg->handleMessage(cmd); + + if (cmd->_messageNum == 29) + processMouse(cmd->_x, cmd->_y); + else if (cmd->_messageNum == 36) + processKey(cmd->_keyCode); + + return false; +} + void ModalSaveGame::processMouse(int x, int y) { for (uint i = 0; i < _files.size(); i++) { if (x >= _files[i]->fx1 && x <= _files[i]->fx2 && y >= _files[i]->fy1 && y <= _files[i]->fy2) { diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index 6bbf6ec53a..48ae2b2970 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -256,7 +256,7 @@ public: virtual ~ModalSaveGame(); virtual bool pollEvent() { return true; } - virtual bool handleMessage(ExCommand *message) { return false; } + virtual bool handleMessage(ExCommand *message); virtual bool init(int counterdiff); virtual void update() {} virtual void saveload() {} |