[Scummvm-git-logs] scummvm master -> 9b7c5bad48529c3d9ed920f03974cb16ce239546
npjg
nathanael.gentrydb8 at gmail.com
Thu Jul 16 15:22:54 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dfd522bbe1 GRAPHICS: MACGUI: Reduce erroneous button activations
9b7c5bad48 DIRECTOR: Get proper zoomBox rectangles
Commit: dfd522bbe10adca16608a95202086c80d269a553
https://github.com/scummvm/scummvm/commit/dfd522bbe10adca16608a95202086c80d269a553
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-07-16T10:31:51-04:00
Commit Message:
GRAPHICS: MACGUI: Reduce erroneous button activations
Changed paths:
graphics/macgui/macbutton.cpp
graphics/macgui/macwindowmanager.cpp
graphics/macgui/macwindowmanager.h
diff --git a/graphics/macgui/macbutton.cpp b/graphics/macgui/macbutton.cpp
index 88091b02da..c9bc88d9f4 100644
--- a/graphics/macgui/macbutton.cpp
+++ b/graphics/macgui/macbutton.cpp
@@ -149,6 +149,8 @@ bool MacButton::processEvent(Common::Event &event) {
if (_wm->_mouseDown) {
if (_wm->_mode & kWMModeButtonDialogStyle)
return true;
+ else if (!_dims.contains(_wm->_lastClickPos))
+ return false;
setActive(true);
}
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 60d04a33bf..1bb2cc5f17 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -451,6 +451,7 @@ bool MacWindowManager::processEvent(Common::Event &event) {
break;
case Common::EVENT_LBUTTONDOWN:
_mouseDown = true;
+ _lastClickPos = event.mouse;
break;
case Common::EVENT_LBUTTONUP:
_mouseDown = false;
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h
index d291cc78c9..c425fef35e 100644
--- a/graphics/macgui/macwindowmanager.h
+++ b/graphics/macgui/macwindowmanager.h
@@ -270,6 +270,7 @@ public:
MacFontManager *_fontMan;
uint32 _mode;
+ Common::Point _lastClickPos;
Common::Point _lastMousePos;
Common::Rect _menuHotzone;
Commit: 9b7c5bad48529c3d9ed920f03974cb16ce239546
https://github.com/scummvm/scummvm/commit/9b7c5bad48529c3d9ed920f03974cb16ce239546
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-07-16T11:21:02-04:00
Commit Message:
DIRECTOR: Get proper zoomBox rectangles
Changed paths:
engines/director/lingo/lingo-builtins.cpp
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 03a08c0baf..57789e6fe6 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -1873,15 +1873,15 @@ void LB::b_zoomBox(int nargs) {
Common::Rect endRect = score->_channels[endSpriteId]->getBbox();
if (endRect.isEmpty()) {
if ((uint)curFrame + 1 < score->_frames.size()) {
- Sprite *endSprite = score->_frames[curFrame + 1]->_sprites[endSpriteId];
- endRect = Common::Rect(endSprite->_width, endSprite->_height);
+ Channel endChannel(score->_frames[curFrame + 1]->_sprites[endSpriteId]);
+ endRect = endChannel.getBbox();
}
}
if (endRect.isEmpty()) {
if ((uint)curFrame - 1 > 0) {
- Sprite *endSprite = score->_frames[curFrame + 1]->_sprites[endSpriteId];
- endRect = Common::Rect(endSprite->_width, endSprite->_height);
+ Channel endChannel(score->_frames[curFrame - 1]->_sprites[endSpriteId]);
+ endRect = endChannel.getBbox();
}
}
More information about the Scummvm-git-logs
mailing list