Struct amethyst_ui::UiLoader[][src]

pub struct UiLoader<'a, I = TextureFormat, F = FontFormat> where
    I: Format<Texture, Options = TextureMetadata> + Sync,
    F: Format<FontAsset, Options = ()> + Sync
{ /* fields omitted */ }

Specialised UI loader

The recommended way of using this in States is with world.exec.

Type parameters:

Example:

This example is not tested
let ui_handle = world.exec(|loader: UiLoader<TextureFormat, FontFormat>| {
    loader.load("renderable.ron", ())
});

Methods

impl<'a, I, F> UiLoader<'a, I, F> where
    I: Format<Texture, Options = TextureMetadata> + Sync + for<'b> Deserialize<'b>,
    F: Format<FontAsset, Options = ()> + Sync + for<'b> Deserialize<'b>, 
[src]

Load ui from disc

Trait Implementations

impl<'a, I, F> SystemData<'a> for UiLoader<'a, I, F> where
    I: Format<Texture, Options = TextureMetadata> + Sync,
    F: Format<FontAsset, Options = ()> + Sync,
    ReadExpect<'a, Loader>: SystemData<'a>,
    Read<'a, AssetStorage<UiPrefab<I, F>>>: SystemData<'a>, 
[src]

Sets up the system data for fetching it from the Resources.

Fetches the system data from Resources. Note that this is only specified for one concrete lifetime 'a, you need to implement the SystemData trait for every possible lifetime. Read more

Returns all read dependencies as fetched from Self::fetch. Read more

Returns all write dependencies as fetched from Self::fetch. Read more

Auto Trait Implementations

impl<'a, I, F> Send for UiLoader<'a, I, F>

impl<'a, I, F> Sync for UiLoader<'a, I, F>