zng::mouse

Function is_mouse_pressed

source
pub fn is_mouse_pressed(
    child: impl UiNode,
    state: impl IntoVar<bool>,
) -> impl UiNode
Expand description

P If the mouse pointer is pressed in the widget and it is enabled.

This is true when the mouse primary button started pressing in the widget and the pointer is over the widget and the primary button is still pressed and the widget is fully ENABLED.

This state property only considers pointer capture for repeat click modes, if the pointer is captured by a widget with ClickMode::repeat false and the pointer is not actually over the widget the state is false, use is_cap_mouse_pressed to always include the captured state.