mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 23:43:34 +00:00
DIRECTOR: Track when mouse is down
This commit is contained in:
parent
cb497e3620
commit
cd7da28a97
@ -74,6 +74,8 @@ void DirectorEngine::processEvents() {
|
||||
spriteId = currentFrame->getSpriteIDFromPos(pos);
|
||||
sc->_currentMouseDownSpriteId = spriteId;
|
||||
|
||||
sc->_mouseIsDown = true;
|
||||
|
||||
debugC(3, kDebugEvents, "event: Button Down @(%d, %d), sprite id: %d", pos.x, pos.y, spriteId);
|
||||
_lingo->processEvent(kEventMouseDown);
|
||||
|
||||
@ -89,6 +91,8 @@ void DirectorEngine::processEvents() {
|
||||
|
||||
debugC(3, kDebugEvents, "event: Button Up @(%d, %d), sprite id: %d", pos.x, pos.y, spriteId);
|
||||
|
||||
sc->_mouseIsDown = false;
|
||||
|
||||
_lingo->processEvent(kEventMouseUp);
|
||||
sc->_currentMouseDownSpriteId = 0;
|
||||
break;
|
||||
|
@ -72,6 +72,7 @@ Score::Score(DirectorEngine *vm) {
|
||||
_lingo = _vm->getLingo();
|
||||
_soundManager = _vm->getSoundManager();
|
||||
_currentMouseDownSpriteId = 0;
|
||||
_mouseIsDown = false;
|
||||
|
||||
// FIXME: TODO: Check whether the original truely does it
|
||||
if (_vm->getVersion() <= 3) {
|
||||
|
@ -137,6 +137,7 @@ public:
|
||||
Archive *_movieArchive;
|
||||
Common::Rect _movieRect;
|
||||
uint16 _currentMouseDownSpriteId;
|
||||
bool _mouseIsDown;
|
||||
|
||||
bool _stopPlay;
|
||||
uint32 _nextFrameTime;
|
||||
|
Loading…
x
Reference in New Issue
Block a user