[Scummvm-git-logs] scummvm master -> 5c4ae5b3274e33b2cb6bcfdbb5b629f23a1d559a
OMGPizzaGuy
noreply at scummvm.org
Tue Jan 2 01:20:52 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5c4ae5b327 ULTIMA8: Ignore hidden gumps on mouse cursor and trace object checks.
Commit: 5c4ae5b3274e33b2cb6bcfdbb5b629f23a1d559a
https://github.com/scummvm/scummvm/commit/5c4ae5b3274e33b2cb6bcfdbb5b629f23a1d559a
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2024-01-01T19:20:21-06:00
Commit Message:
ULTIMA8: Ignore hidden gumps on mouse cursor and trace object checks.
FIxes #14794
Changed paths:
engines/ultima/ultima8/gumps/gump.cpp
diff --git a/engines/ultima/ultima8/gumps/gump.cpp b/engines/ultima/ultima8/gumps/gump.cpp
index 17ab61a5ab4..9bc88aa57ca 100644
--- a/engines/ultima/ultima8/gumps/gump.cpp
+++ b/engines/ultima/ultima8/gumps/gump.cpp
@@ -205,8 +205,9 @@ bool Gump::GetMouseCursor(int32 mx, int32 my, Shape &shape, int32 &frame) {
{
Gump *g = *it;
- // Not if closing
- if (g->_flags & FLAG_CLOSING) continue;
+ // Not if closing or hidden
+ if (g->_flags & FLAG_CLOSING || g->IsHidden())
+ continue;
// It's got the point
if (g->PointOnGump(mx, my))
@@ -501,8 +502,9 @@ uint16 Gump::TraceObjId(int32 mx, int32 my) {
for (it = _children.rbegin(); it != _children.rend(); ++it) {
Gump *g = *it;
- // Not if closing
- if (g->_flags & FLAG_CLOSING) continue;
+ // Not if closing or hidden
+ if (g->_flags & FLAG_CLOSING || g->IsHidden())
+ continue;
// It's got the point
if (g->PointOnGump(gx, gy)) objId_ = g->TraceObjId(gx, gy);
@@ -702,8 +704,9 @@ Gump *Gump::onMouseDown(int button, int32 mx, int32 my) {
for (it = _children.rbegin(); it != _children.rend(); ++it) {
Gump *g = *it;
- // Not if closing
- if (g->_flags & FLAG_CLOSING || g->IsHidden()) continue;
+ // Not if closing or hidden
+ if (g->_flags & FLAG_CLOSING || g->IsHidden())
+ continue;
// It's got the point
if (g->PointOnGump(mx, my)) handled = g->onMouseDown(button, mx, my);
@@ -725,8 +728,9 @@ Gump *Gump::onMouseMotion(int32 mx, int32 my) {
for (it = _children.rbegin(); it != _children.rend(); ++it) {
Gump *g = *it;
- // Not if closing
- if (g->_flags & FLAG_CLOSING || g->IsHidden()) continue;
+ // Not if closing or hidden
+ if (g->_flags & FLAG_CLOSING || g->IsHidden())
+ continue;
// It's got the point
if (g->PointOnGump(mx, my)) handled = g->onMouseMotion(mx, my);
More information about the Scummvm-git-logs
mailing list