pub trait RegisterInspectable {
fn inspectable_registry(&mut self) -> Mut<'_, InspectableRegistry>;
fn register_inspectable<T: Inspectable + 'static>(&mut self) -> &mut Self;
fn register_inspectable_raw<T: 'static, F>(&mut self, f: F) -> &mut Self
where
F: Fn(&mut T, &mut Ui, &mut Context<'_>) -> bool + Send + Sync + 'static;
}
Expand description
Helper trait for enabling app.register_inspectable::<T>()
Required Methods
sourcefn inspectable_registry(&mut self) -> Mut<'_, InspectableRegistry>
fn inspectable_registry(&mut self) -> Mut<'_, InspectableRegistry>
Get/initialize the InspectableRegistry
from the world.
sourcefn register_inspectable<T: Inspectable + 'static>(&mut self) -> &mut Self
fn register_inspectable<T: Inspectable + 'static>(&mut self) -> &mut Self
Register type T
so that it can be displayed by the WorldInspectorPlugin
.
Forwards to InspectableRegistry::register
.
sourcefn register_inspectable_raw<T: 'static, F>(&mut self, f: F) -> &mut Selfwhere
F: Fn(&mut T, &mut Ui, &mut Context<'_>) -> bool + Send + Sync + 'static,
fn register_inspectable_raw<T: 'static, F>(&mut self, f: F) -> &mut Selfwhere
F: Fn(&mut T, &mut Ui, &mut Context<'_>) -> bool + Send + Sync + 'static,
Register type T
that might not implement Inspectable
so that it can be displayed by the WorldInspectorPlugin
.
Forwards to InspectableRegistry::register_raw
.