Struct arcdps_imgui::Slider
source · pub struct Slider<Label, Data, Format = &'static str> { /* private fields */ }
Expand description
Builder for a slider widget.
Implementations§
source§impl<Label, Data, Format> Slider<Label, Data, Format>
impl<Label, Data, Format> Slider<Label, Data, Format>
sourcepub fn range(self, min: Data, max: Data) -> Self
pub fn range(self, min: Data, max: Data) -> Self
Sets the range inclusively, such that both values given are valid values which the slider can be dragged to.
arcdps_imgui::Slider::new(im_str!("Example"), i8::MIN, i8::MAX)
.range(4, 8)
// Remember to call .build(&ui)
;
It is safe, though up to C++ Dear ImGui, on how to handle when
min > max
.
sourcepub fn display_format<Format2: AsRef<str>>(
self,
display_format: Format2,
) -> Slider<Label, Data, Format2>
pub fn display_format<Format2: AsRef<str>>( self, display_format: Format2, ) -> Slider<Label, Data, Format2>
Sets the display format using a C-style printf string
sourcepub fn flags(self, flags: SliderFlags) -> Self
pub fn flags(self, flags: SliderFlags) -> Self
Replaces all current settings with the given flags
sourcepub fn build(self, ui: &Ui<'_>, value: &mut Data) -> bool
pub fn build(self, ui: &Ui<'_>, value: &mut Data) -> bool
Builds a slider that is bound to the given value.
Returns true if the slider value was changed.
sourcepub fn build_array(self, ui: &Ui<'_>, values: &mut [Data]) -> bool
pub fn build_array(self, ui: &Ui<'_>, values: &mut [Data]) -> bool
Builds a horizontal array of multiple sliders attached to the given slice.
Returns true if any slider value was changed.
Trait Implementations§
impl<Label: Copy, Data: Copy, Format: Copy> Copy for Slider<Label, Data, Format>
Auto Trait Implementations§
impl<Label, Data, Format> Freeze for Slider<Label, Data, Format>
impl<Label, Data, Format> RefUnwindSafe for Slider<Label, Data, Format>
impl<Label, Data, Format> Send for Slider<Label, Data, Format>
impl<Label, Data, Format> Sync for Slider<Label, Data, Format>
impl<Label, Data, Format> Unpin for Slider<Label, Data, Format>
impl<Label, Data, Format> UnwindSafe for Slider<Label, Data, Format>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)