Struct imgui::Slider

source ·
pub struct Slider<'ui, Label, Data, Format = &'static str> { /* private fields */ }
Expand description

Builder for a slider widget.

Implementations§

👎Deprecated since 0.9.0: Use Ui::slider or Ui::slider_config.

Constructs a new slider builder with the given range.

Sets the range inclusively, such that both values given are valid values which the slider can be dragged to.

ui.slider_config("Example", i8::MIN, i8::MAX)
    .range(4, 8)
    // Remember to call .build()
    ;

It is safe, though up to C++ Dear ImGui, on how to handle when min > max.

Note for f32 and f64 sliders, Dear ImGui limits the available range to half their full range (e.g f32::MIN/2.0 .. f32::MAX/2.0) Specifying a value above this will cause an abort. For large ranged values, consider using Ui::input_scalar instead

Sets the display format using a C-style printf string

Replaces all current settings with the given flags

Builds a slider that is bound to the given value.

Returns true if the slider value was changed.

Builds a horizontal array of multiple sliders attached to the given slice.

Returns true if any slider value was changed.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.