aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/console.cpp3
-rw-r--r--engines/lab/eventman.cpp5
-rw-r--r--engines/lab/eventman.h4
-rw-r--r--engines/lab/lab.cpp3
4 files changed, 11 insertions, 4 deletions
diff --git a/engines/lab/console.cpp b/engines/lab/console.cpp
index 35e29f2920..217dc28579 100644
--- a/engines/lab/console.cpp
+++ b/engines/lab/console.cpp
@@ -53,7 +53,8 @@ bool Console::Cmd_Scene(int argc, const char **argv) {
_vm->_closeDataPtr = nullptr;
_vm->_mainDisplay = true;
_vm->_followingCrumbs = false;
- _vm->_event->simulateLeftClick();
+ _vm->_event->simulateEvent();
+ _vm->_graphics->_longWinInFront = false;
return false;
}
diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp
index 333cedd749..a94ddbf16b 100644
--- a/engines/lab/eventman.cpp
+++ b/engines/lab/eventman.cpp
@@ -205,4 +205,9 @@ Common::Point EventManager::updateAndGetMousePos() {
return _mousePos;
}
+void EventManager::simulateEvent() {
+ // Simulate an event by setting an unused key
+ _keyPressed = Common::KeyState(Common::KEYCODE_SEMICOLON);
+}
+
} // End of namespace Lab
diff --git a/engines/lab/eventman.h b/engines/lab/eventman.h
index c282f5106f..37745292fa 100644
--- a/engines/lab/eventman.h
+++ b/engines/lab/eventman.h
@@ -123,10 +123,10 @@ public:
Common::Point updateAndGetMousePos();
/**
- * Simulates a left click for the game main loop, when a game is
+ * Simulates an event for the game main loop, when a game is
* loaded or when the user teleports to a scene
*/
- void simulateLeftClick() { _leftClick = true; }
+ void simulateEvent();
};
} // End of namespace Lab
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index 905f09c106..47b864d98b 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -249,7 +249,8 @@ Common::Error LabEngine::loadGameState(int slot) {
_closeDataPtr = nullptr;
_mainDisplay = true;
_followingCrumbs = false;
- _event->simulateLeftClick();
+ _event->simulateEvent();
+ _graphics->_longWinInFront = false;
return (result) ? Common::kNoError : Common::kUserCanceled;
}