forked from rosebudai/OpenRCT2-Web
Ignore group boxes when determining top widget (#26781)
This commit is contained in:
1 parent
50d91c4e5f
commit
72ed2a896c
1 file changed
+7
-6
@@ -1206,13 +1206,14 @@ public:
|
||||
{
|
||||
const auto& widget = w.widgets[i];
|
||||
|
||||
if (widget.type != WidgetType::empty && widget.isVisible())
|
||||
// Group boxes may overlay previous widgets when shared. Given their appearance, we consider them empty overlays.
|
||||
if (widget.type == WidgetType::empty || widget.type == WidgetType::groupbox || !widget.isVisible())
|
||||
continue;
|
||||
|
||||
if (screenCoords.x >= w.windowPos.x + widget.left && screenCoords.x <= w.windowPos.x + widget.right
|
||||
&& screenCoords.y >= w.windowPos.y + widget.top && screenCoords.y <= w.windowPos.y + widget.bottom)
|
||||
{
|
||||
if (screenCoords.x >= w.windowPos.x + widget.left && screenCoords.x <= w.windowPos.x + widget.right
|
||||
&& screenCoords.y >= w.windowPos.y + widget.top && screenCoords.y <= w.windowPos.y + widget.bottom)
|
||||
{
|
||||
widget_index = i;
|
||||
}
|
||||
widget_index = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user