Struct tuix_internal::Knob [−][src]
pub struct Knob<T> where
T: NormalizedMap, {
pub normalized_value: f32,
pub map: T,
// some fields omitted
}
Fields
normalized_value: f32
map: T
Implementations
Set the callback triggered when the slider value is changing (dragging).
Takes a closure which triggers when the slider value is changing, either by pressing the track or dragging the thumb along the track.
Example
Slider::new()
.on_changing(|slider, state, entity| {
entity.emit(WindowEvent::Debug(format!("Slider on_changing: {}", slider.value)));
})
.build(state, parent, |builder| builder);
Trait Implementations
Adds the widget into state and returns the associated type Ret - an entity id or a tuple of entity ids