[−][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, context: &Context) { 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,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
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,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for Transform
[src]
type Attributes = ()
pub fn ui(
&mut self,
ui: &mut Ui,
_options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
_options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for Mat3
[src]
type Attributes = ()
pub fn ui(&mut self, ui: &mut Ui, _: Self::Attributes, context: &Context<'_>)
[src]
impl Inspectable for Mat4
[src]
type Attributes = ()
pub fn ui(&mut self, ui: &mut Ui, _: Self::Attributes, context: &Context<'_>)
[src]
impl Inspectable for Color
[src]
type Attributes = ColorAttributes
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes, _: &Context<'_>)
[src]
impl Inspectable for StandardMaterial
[src]
type Attributes = ()
pub fn ui(&mut self, ui: &mut Ui, _: Self::Attributes, context: &Context<'_>)
[src]
impl<T> Inspectable for Vec<T> where
T: Inspectable + Default,
T::Attributes: Clone,
[src]
T: Inspectable + Default,
T::Attributes: Clone,
type Attributes = <T as Inspectable>::Attributes
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for f32
[src]
type Attributes = NumberAttributes<f32>
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes, _: &Context<'_>)
[src]
impl Inspectable for f64
[src]
type Attributes = NumberAttributes<f64>
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes, _: &Context<'_>)
[src]
impl Inspectable for u8
[src]
type Attributes = NumberAttributes<u8>
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes, _: &Context<'_>)
[src]
impl Inspectable for i32
[src]
type Attributes = NumberAttributes<i32>
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes, _: &Context<'_>)
[src]
impl Inspectable for u16
[src]
type Attributes = NumberAttributes<u16>
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for u32
[src]
type Attributes = NumberAttributes<u32>
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for u64
[src]
type Attributes = NumberAttributes<u64>
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for i8
[src]
type Attributes = NumberAttributes<i8>
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for i16
[src]
type Attributes = NumberAttributes<i16>
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for i64
[src]
type Attributes = NumberAttributes<i64>
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for String
[src]
type Attributes = StringAttributes
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes, _: &Context<'_>)
[src]
impl Inspectable for bool
[src]
type Attributes = ()
pub fn ui(&mut self, ui: &mut Ui, _: Self::Attributes, _: &Context<'_>)
[src]
impl<T> Inspectable for RangeInclusive<T> where
T: Inspectable + Default,
T::Attributes: Clone,
[src]
T: Inspectable + Default,
T::Attributes: Clone,
type Attributes = T::Attributes
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl<T> Inspectable for Range<T> where
T: Inspectable + Default,
T::Attributes: Clone,
[src]
T: Inspectable + Default,
T::Attributes: Clone,
type Attributes = T::Attributes
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for Vec2
[src]
type Attributes = Vec2dAttributes
pub fn ui(&mut self, ui: &mut Ui, options: Self::Attributes, _: &Context<'_>)
[src]
impl Inspectable for Vec3
[src]
type Attributes = NumberAttributes<Vec3>
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl Inspectable for Vec4
[src]
type Attributes = NumberAttributes<Vec4>
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
impl<T: Asset + Inspectable> Inspectable for Handle<T>
[src]
type Attributes = T::Attributes
pub fn ui(
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)
[src]
&mut self,
ui: &mut Ui,
options: Self::Attributes,
context: &Context<'_>
)