aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-04-30 07:41:17 +0300
committerEugene Sandulenko2014-04-30 08:22:23 +0300
commit1e4f171e8add003a40454af911d933cd6b9ffd0c (patch)
tree3e3ec8f5709305c782b01794907b850c02a95f2a /engines
parent8fde4cf50f7095c17eafd6bc4946837883e0f0c5 (diff)
downloadscummvm-rg350-1e4f171e8add003a40454af911d933cd6b9ffd0c.tar.gz
scummvm-rg350-1e4f171e8add003a40454af911d933cd6b9ffd0c.tar.bz2
scummvm-rg350-1e4f171e8add003a40454af911d933cd6b9ffd0c.zip
FULLPIPE: Implement ModalSaveGame::handleMessage()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/modal.cpp12
-rw-r--r--engines/fullpipe/modal.h2
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() {}