src/main/java/dev/lambdaurora/spruceui/widget/container/SpruceParentWidget.java
default Optional<E> hoveredElement(double mouseX, double mouseY) {
        var it = this.children().iterator();

        E element;
        do {
            if (!it.hasNext()) {
                return Optional.empty();
            }

            element = it.next();
        } while (!element.isMouseOver(mouseX, mouseY));

        return Optional.of(element);
    }
/**
     * Returns the potential hovered element at the given mouse coordinates.
     *
     * @param mouseX the mouse X-coordinate
     * @param mouseY the mouse Y-coordinate
     * @return the hovered element if it exists, may be empty if none is present at the given coordinates
     */
Returns the potential hovered element at the given mouse coordinates.
@param mouseX the mouse X-coordinate
@param mouseY the mouse Y-coordinate
@return the hovered element if it exists, may be empty if none is present at the given coordinates
Returns the potential hovered element at the given mouse coordinates . @param mouseX the mouse X - coordinate @param mouseY the mouse Y - coordinate @return the hovered element if it exists may be empty if none is present at the given coordinates
default Optional<E> hoveredElement(double mouseX, double mouseY) {
        var it = this.children().iterator();
        E element;
        do {
            if (!it.hasNext()) {
                return Optional.empty();
            }
            element = it.next();
        } while (!element.isMouseOver(mouseX, mouseY));
        return Optional.of(element);
    }
default Optional < E > hoveredElement ( double mouseX , double mouseY ) { var it = this . children ( ) . iterator ( ) ; E element ; do { if ( ! it . hasNext ( ) ) { return Optional . empty ( ) ; } element = it . next ( ) ; } while ( ! element . isMouseOver ( mouseX , mouseY ) ) ; return Optional . of ( element ) ; }
Returns the potential hovered element at the given mouse coordinates.
Returns the potential hovered element at the given mouse coordinates .