Small request


#1

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


#2

Sounds like a reasonable request!


#3

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;
}

#4

Sure, I’ll add that for you…