Struct bevy_mod_imgui::prelude::ColorEdit3
source · pub struct ColorEdit3<'ui, 'a, Label, C> { /* private fields */ }Expand description
Builder for a color editor widget.
Examples
if ui.color_edit4("color_edit", &mut color) {
println!("The color was changed");
}Implementations§
source§impl<'ui, 'a, Label, C> ColorEdit3<'ui, 'a, Label, C>
impl<'ui, 'a, Label, C> ColorEdit3<'ui, 'a, Label, C>
sourcepub fn new(
ui: &'ui Ui,
label: Label,
value: &'a mut C
) -> ColorEdit3<'ui, 'a, Label, C>
👎Deprecated since 0.9.0: Use ui.color_edit3(...) instead
pub fn new( ui: &'ui Ui, label: Label, value: &'a mut C ) -> ColorEdit3<'ui, 'a, Label, C>
ui.color_edit3(...) insteadConstructs a new color editor builder.
sourcepub fn flags(self, flags: ColorEditFlags) -> ColorEdit3<'ui, 'a, Label, C>
pub fn flags(self, flags: ColorEditFlags) -> ColorEdit3<'ui, 'a, Label, C>
Replaces all current settings with the given flags.
sourcepub fn alpha(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn alpha(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
Enables/disables the use of the alpha component.
sourcepub fn picker(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn picker(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
Enables/disables the picker that appears when clicking on colored square.
sourcepub fn options(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn options(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
Enables/disables toggling of the options menu when right-clicking on inputs or the small preview.
sourcepub fn small_preview(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn small_preview(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
Enables/disables the colored square preview next to the inputs.
sourcepub fn inputs(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn inputs(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
Enables/disables the input sliders/text widgets.
sourcepub fn tooltip(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn tooltip(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
Enables/disables the tooltip that appears when hovering the preview.
sourcepub fn label(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn label(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
Enables/disables display of the inline text label (the label is in any case forwarded to the tooltip and picker).
sourcepub fn alpha_bar(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn alpha_bar(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
Enables/disables the vertical alpha bar/gradient in the color picker.
sourcepub fn preview(self, preview: ColorPreview) -> ColorEdit3<'ui, 'a, Label, C>
pub fn preview(self, preview: ColorPreview) -> ColorEdit3<'ui, 'a, Label, C>
Sets the preview style.
sourcepub fn hdr(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
pub fn hdr(self, value: bool) -> ColorEdit3<'ui, 'a, Label, C>
(WIP) Currently only disables 0.0..1.0 limits in RGBA edition.
Note: you probably want to use ColorFormat::Float as well.
sourcepub fn input_mode(
self,
input_mode: ColorEditInputMode
) -> ColorEdit3<'ui, 'a, Label, C>
pub fn input_mode( self, input_mode: ColorEditInputMode ) -> ColorEdit3<'ui, 'a, Label, C>
Sets the data format for input and output data.
sourcepub fn display_mode(
self,
mode: ColorEditDisplayMode
) -> ColorEdit3<'ui, 'a, Label, C>
pub fn display_mode( self, mode: ColorEditDisplayMode ) -> ColorEdit3<'ui, 'a, Label, C>
Sets the color editor display mode.
sourcepub fn format(self, format: ColorFormat) -> ColorEdit3<'ui, 'a, Label, C>
pub fn format(self, format: ColorFormat) -> ColorEdit3<'ui, 'a, Label, C>
Sets the formatting style of color components.
Trait Implementations§
Auto Trait Implementations§
impl<'ui, 'a, Label, C> !RefUnwindSafe for ColorEdit3<'ui, 'a, Label, C>
impl<'ui, 'a, Label, C> !Send for ColorEdit3<'ui, 'a, Label, C>
impl<'ui, 'a, Label, C> !Sync for ColorEdit3<'ui, 'a, Label, C>
impl<'ui, 'a, Label, C> Unpin for ColorEdit3<'ui, 'a, Label, C>where
Label: Unpin,
impl<'ui, 'a, Label, C> !UnwindSafe for ColorEdit3<'ui, 'a, Label, C>
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T [ShaderType] for self. When used in [AsBindGroup]
derives, it is safe to assume that all images in self exist.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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.