Function zng::touch::on_touched

source ·
pub fn on_touched(
    child: impl UiNode,
    handler: impl WidgetHandler<TouchedArgs>,
) -> impl UiNode
Expand description

P Touch contact entered or left the widget and descendants area and it is enabled.

You can use the is_touch_enter and is_touch_leave methods to determinate the state change.

§Preview

You can preview this event using on_pre_touched. Otherwise the handler is only called after the widget content has a chance to stop propagation.

§Async

You can use async event handlers with this property.