diff options
author | Marisa-Chan | 2014-07-05 17:27:08 +0000 |
---|---|---|
committer | Marisa-Chan | 2014-07-05 17:27:08 +0000 |
commit | bbaebdf680179dca103b0ed635e791aa602d610d (patch) | |
tree | 99f94b1aeff1ef4178e2fa44878c9ca4244aa8e9 /engines/zvision/core/events.cpp | |
parent | 628d6cb4ee92aa15dbdf5029b8675cb09d18f3e9 (diff) | |
download | scummvm-rg350-bbaebdf680179dca103b0ed635e791aa602d610d.tar.gz scummvm-rg350-bbaebdf680179dca103b0ed635e791aa602d610d.tar.bz2 scummvm-rg350-bbaebdf680179dca103b0ed635e791aa602d610d.zip |
ZVISION: Process events for controls similar to original engine, fix some errors.
Diffstat (limited to 'engines/zvision/core/events.cpp')
-rw-r--r-- | engines/zvision/core/events.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/engines/zvision/core/events.cpp b/engines/zvision/core/events.cpp index 943f8ff279..c977125f55 100644 --- a/engines/zvision/core/events.cpp +++ b/engines/zvision/core/events.cpp @@ -46,13 +46,15 @@ void ZVision::processEvents() { case Common::EVENT_LBUTTONDOWN: _cursorManager->cursorDown(true); _scriptManager->setStateValue(StateKey_LMouse, 1); - onMouseDown(_event.mouse); + _menu->onMouseDown(_event.mouse); + _scriptManager->addEvent(_event); break; case Common::EVENT_LBUTTONUP: _cursorManager->cursorDown(false); _scriptManager->setStateValue(StateKey_LMouse, 0); - onMouseUp(_event.mouse); + _menu->onMouseUp(_event.mouse); + _scriptManager->addEvent(_event); break; case Common::EVENT_RBUTTONDOWN: @@ -87,10 +89,10 @@ void ZVision::processEvents() { break; } - _scriptManager->onKeyDown(_event.kbd); + _scriptManager->addEvent(_event); break; case Common::EVENT_KEYUP: - _scriptManager->onKeyUp(_event.kbd); + _scriptManager->addEvent(_event); break; default: break; @@ -98,20 +100,6 @@ void ZVision::processEvents() { } } -void ZVision::onMouseDown(const Common::Point &pos) { - _menu->onMouseDown(pos); - - Common::Point imageCoord(_renderManager->screenSpaceToImageSpace(pos)); - _scriptManager->onMouseDown(pos, imageCoord); -} - -void ZVision::onMouseUp(const Common::Point &pos) { - _menu->onMouseUp(pos); - - Common::Point imageCoord(_renderManager->screenSpaceToImageSpace(pos)); - _scriptManager->onMouseUp(pos, imageCoord); -} - void ZVision::onMouseMove(const Common::Point &pos) { _menu->onMouseMove(pos); Common::Point imageCoord(_renderManager->screenSpaceToImageSpace(pos)); |