Skip to main content

snapshot_slider_drag_origin

Function snapshot_slider_drag_origin 

Source
pub fn snapshot_slider_drag_origin(
    commands: Commands<'_, '_>,
    starts: MessageReader<'_, '_, DragStartEvent>,
    sliders: Query<'_, '_, &SliderValue>,
    parents: Query<'_, '_, &ChildOf>,
)
Expand description

On DragStartEvent targeting a slider (or its thumb child), stash the current value so Escape can restore it. Ordered before set_slider_on_drag so the snapshot always precedes this tick’s moves.