[][src]Trait amethyst_inspector::Inspect

pub trait Inspect<'a>: Component {
type SystemData: SystemData<'a>;
    fn inspect(data: &mut Self::SystemData, entity: Entity) { ... }
fn can_add(data: &mut Self::SystemData, entity: Entity) -> bool { ... }
fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool { ... }
fn add(data: &mut Self::SystemData, entity: Entity) { ... }
fn setup(data: &mut Self::SystemData, entity: Option<Entity>) { ... } }

Any component implementing Inspect and included in your inspect! will show up in the inspector Whether the component is addable is decided by can_add(...)

Associated Types

type SystemData: SystemData<'a>

Loading content...

Provided methods

fn inspect(data: &mut Self::SystemData, entity: Entity)

This method is only ran if the component contains the selected entity

fn can_add(data: &mut Self::SystemData, entity: Entity) -> bool

Decide if this component can be added (e.g. because it requires another component)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool

Decide if this component can be removed (e.g. because it's required by another component)

fn add(data: &mut Self::SystemData, entity: Entity)

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)

This method is ran on all entities, even if none are selected

Loading content...

Implementations on Foreign Types

impl<'a> Inspect<'a> for Blink[src]

type SystemData = (ReadStorage<'a, Self>, Read<'a, LazyUpdate>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for Named[src]

type SystemData = (ReadStorage<'a, Self>, Read<'a, LazyUpdate>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for Rgba[src]

type SystemData = (ReadStorage<'a, Self>, Read<'a, LazyUpdate>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for SpriteRender[src]

type SystemData = (ReadStorage<'a, Self>, ReadExpect<'a, AssetStorage<SpriteSheet>>, Read<'a, SpriteList>, Read<'a, LazyUpdate>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for TextureHandle[src]

type SystemData = (ReadStorage<'a, Self>, Read<'a, TextureList>, Read<'a, LazyUpdate>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for Transform<f32>[src]

type SystemData = (ReadStorage<'a, Self>, Read<'a, LazyUpdate>, Write<'a, TransformInspectorData>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for UiText[src]

type SystemData = (ReadStorage<'a, Self>, ReadStorage<'a, UiTransform>, ReadExpect<'a, Loader>, ReadExpect<'a, AssetStorage<FontAsset>>, Read<'a, FontList>, Read<'a, LazyUpdate>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for UiTransform[src]

type SystemData = (ReadStorage<'a, Self>, Read<'a, LazyUpdate>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for Hidden[src]

type SystemData = Read<'a, LazyUpdate>

fn inspect(data: &mut Self::SystemData, entity: Entity)[src]

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for HiddenPropagate[src]

type SystemData = Read<'a, LazyUpdate>

fn inspect(data: &mut Self::SystemData, entity: Entity)[src]

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for ScreenSpace[src]

type SystemData = Read<'a, LazyUpdate>

fn inspect(data: &mut Self::SystemData, entity: Entity)[src]

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for Transparent[src]

type SystemData = Read<'a, LazyUpdate>

fn inspect(data: &mut Self::SystemData, entity: Entity)[src]

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

impl<'a> Inspect<'a> for Flipped[src]

type SystemData = (Read<'a, LazyUpdate>, ReadStorage<'a, Self>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

fn setup(data: &mut Self::SystemData, entity: Option<Entity>)[src]

Loading content...

Implementors

impl<'a> Inspect<'a> for UiTransformDebug[src]

type SystemData = (ReadStorage<'a, Self>, ReadStorage<'a, UiTransform>, ReadStorage<'a, Transform<f32>>, ReadStorage<'a, Parent>, ReadExpect<'a, ParentHierarchy>, ReadExpect<'a, ScreenDimensions>, ReadStorage<'a, Named>, ReadStorage<'a, Camera>, Entities<'a>, Read<'a, LazyUpdate>)

fn can_remove(data: &mut Self::SystemData, entity: Entity) -> bool[src]

Loading content...