[−][src]Trait bevy_inspector_egui::Inspectable
This trait describes how a struct should be displayed. It can be derived for structs and enums, see the crate-level docs for how to do that.
Associated Types
type Attributes: Default
[src]
The Attributes
associated type specifies what attributes can be passed to a field.
See the following snippet for an example:
struct MyCustomType; struct MyWidgetAttributes { a: f32, b: Option<String> } impl Inspectable for MyCustomType { type Attributes = MyWidgetAttributes; fn ui(&mut self, _: &mut egui::Ui, options: MyWidgetAttributes) { println!("a = {}, b = {:?}", options.a, options.b); } } // ... #[derive(Inspectable)] struct InspectorData { #[inspectable(a = 10.0, b = None)] value: MyCustomType, }
Required methods
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes)
[src]
This methods is responsible for building the egui ui.
Implementations on Foreign Types
impl Inspectable for Quat
[src]
type Attributes = NumberAttributes<[f32; 4]>
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes)
[src]
impl Inspectable for Transform
[src]
type Attributes = ()
pub fn ui(&mut self, ui: &mut Ui, _options: Self::Attributes)
[src]
impl Inspectable for Mat3
[src]
type Attributes = ()
pub fn ui(&mut self, ui: &mut Ui, _: Self::Attributes)
[src]
impl Inspectable for Mat4
[src]
type Attributes = ()
pub fn ui(&mut self, ui: &mut Ui, _: Self::Attributes)
[src]
impl Inspectable for Color
[src]
type Attributes = ColorAttributes
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes)
[src]
impl<T> Inspectable for Vec<T> where
T: Inspectable + Default,
T::Attributes: Clone,
[src]
T: Inspectable + Default,
T::Attributes: Clone,