Struct conrod::Slider
[−]
[src]
pub struct Slider<'a, T, F> { // some fields omitted }
Linear value selection. If the slider's width is greater than it's height, it will automatically become a horizontal slider, otherwise it will be a vertical slider. Its reaction is triggered if the value is updated or if the mouse button is released while the cursor is above the rectangle.
Methods
impl<'a, T, F> Slider<'a, T, F>
fn new(value: T, min: T, max: T) -> Slider<'a, T, F>
Construct a new Slider widget.
fn react(self, reaction: F) -> Slider<'a, T, F>
Set the reaction for the Slider. It will be triggered if the value is updated or if the mouse button is released while the cursor is above the rectangle.
fn set<C>(self, ui_id: UiId, ui: &mut Ui<C>) where C: CharacterCache, F: FnMut(T), T: Float + NumCast + ToPrimitive
After building the Button, use this method to set its current state into the given Ui
.
It will use this state for rendering the next time ui.draw(graphics)
is called.