Small request

It would be handy if Component::isMouseOverOrDragging() could take an "includeChildren" parameter, just as we have for Component::isMouseOver (bool includeChildren = false)

Sounds like a reasonable request!

and now… could we actually also have that ‘includeChildren’ parameter for Component::isMouseButtonDown() ? :slight_smile:

bool Component::isMouseButtonDown (bool includeChildren) const
    for (auto& ms : Desktop::getInstance().getMouseSources())
        auto* c = ms.getComponentUnderMouse();

        if ((c == this || (includeChildren && isParentOf (c)))
            && ms.isDragging())
            return true;
    return false;

Sure, I’ll add that for you…

1 Like