pub fn check_mouse_condition(mouse_position: Point, widget: &WidgetContainer<'_>) -> bool {
    let enabled = widget.get::<bool>("enabled");

    if !enabled {
        return false;
    }

    let bounds = widget.get::<Rectangle>("bounds");
    let position = widget.get::<Point>("position");

    let mut rect = Rectangle::new((0.0, 0.0), (bounds.width(), bounds.height()));

    rect.set_x(position.x());
    rect.set_y(position.y());

    rect.contains(mouse_position)
}
/// Checks if the given point is inside of a widget.
Checks if the given point is inside of a widget.
Checks if the given point is inside of a widget .
pub fn check_mouse_condition(mouse_position: Point, widget: &WidgetContainer<'_>) -> bool {
    let enabled = widget.get::<bool>("enabled");
    if !enabled {
        return false;
    }
    let bounds = widget.get::<Rectangle>("bounds");
    let position = widget.get::<Point>("position");
    let mut rect = Rectangle::new((0.0, 0.0), (bounds.width(), bounds.height()));
    rect.set_x(position.x());
    rect.set_y(position.y());
    rect.contains(mouse_position)
}
pub fn check_mouse_condition ( mouse_position : Point , widget : & WidgetContainer < ' _ > ) -> bool { let enabled = widget . get :: < bool > ( " " ) ; if ! enabled { return false ; } let bounds = widget . get :: < Rectangle > ( " " ) ; let position = widget . get :: < Point > ( " " ) ; let mut rect = Rectangle :: new ( ( 0.0 , 0.0 ) , ( bounds . width ( ) , bounds . height ( ) ) ) ; rect . set_x ( position . x ( ) ) ; rect . set_y ( position . y ( ) ) ; rect . contains ( mouse_position ) }
Checks if the given point is inside of a widget.
Checks if the given point is inside of a widget .
mouse_position
Point
widget
&WidgetContainer<'_>