Skip to main content

knob_drag

Function knob_drag 

Source
fn knob_drag(
    ui: &Ui,
    id: Id,
    knob: Rect,
    axis: usize,
    track_len: f32,
    max: f32,
) -> f32
Expand description

Drag knob (it senses clicks too, so the egui bar under it never jumps): the scroll offset change for this frame’s drag, mapping the knob’s free travel (track_len minus the knob) onto the max scrollable points.