[][src]Struct amethyst_ui::UiLoader

pub struct UiLoader<'a, C = NoCustomUi, W = u32> where
    C: ToNativeWidget<W>,
    W: WidgetId
{ /* 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, C, W> UiLoader<'a, C, W> where
    C: ToNativeWidget<W> + for<'de> Deserialize<'de> + Send + Sync + 'static,
    W: WidgetId + DeserializeOwned
[src]

pub fn load<N, P>(
    &self,
    name: N,
    progress: P
) -> Handle<UiPrefab<C::PrefabData, W>> where
    N: Into<String>,
    P: Progress
[src]

Load ui from disc

Trait Implementations

impl<'a, C, W> SystemData<'a> for UiLoader<'a, C, W> where
    C: ToNativeWidget<W>,
    W: WidgetId,
    ReadExpect<'a, Loader>: SystemData<'a>,
    Read<'a, AssetStorage<UiPrefab<C::PrefabData, W>>>: SystemData<'a>, 
[src]

Auto Trait Implementations

impl<'a, C, W> Unpin for UiLoader<'a, C, W>

impl<'a, C, W> Sync for UiLoader<'a, C, W> where
    <C as ToNativeWidget<W>>::PrefabData: Send + Sync

impl<'a, C, W> Send for UiLoader<'a, C, W> where
    <C as ToNativeWidget<W>>::PrefabData: Send + Sync

impl<'a, C = NoCustomUi, W = u32> !UnwindSafe for UiLoader<'a, C, W>

impl<'a, C = NoCustomUi, W = u32> !RefUnwindSafe for UiLoader<'a, C, W>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<'a, T> DynamicSystemData<'a> for T where
    T: SystemData<'a>, 
[src]

type Accessor = StaticAccessor<T>

The accessor of the SystemData, which specifies the read and write dependencies and does the fetching. Read more

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]

impl<T> Erased for T[src]

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.

impl<T> Supports<T> for T[src]

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]