[][src]Struct amethyst_ui::UiCreator

pub struct UiCreator<'a, C = NoCustomUi, W = u32> where
    C: ToNativeWidget<W>,
    W: WidgetId
{ /* fields omitted */ }

Ui Creator, wrapper around loading and creating a UI directly.

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(|creator: UiCreator| {
    creator.create("renderable.ron", ())
});

Methods

impl<'a, C, W> UiCreator<'a, C, W> where
    C: ToNativeWidget<W> + for<'de> Deserialize<'de> + Send + Sync + 'static,
    W: WidgetId + DeserializeOwned
[src]

pub fn create<N, P>(&mut self, name: N, progress: P) -> Entity where
    N: Into<String>,
    P: Progress
[src]

Create a UI.

Will load a UI from the given ron file, create an Entity and load the UI with that Entity as the root of the UI hierarchy.

Parameters:

  • name: Name of a ron asset in the UiFormat format
  • progress: Progress tracker

Returns

The Entity that was created that will form the root of the loaded UI.

Trait Implementations

impl<'a, C, W> SystemData<'a> for UiCreator<'a, C, W> where
    C: ToNativeWidget<W>,
    W: WidgetId,
    UiLoader<'a, C, W>: SystemData<'a>,
    Entities<'a>: SystemData<'a>,
    WriteStorage<'a, Handle<UiPrefab<C::PrefabData, W>>>: SystemData<'a>, 
[src]

Auto Trait Implementations

impl<'a, C, W> Unpin for UiCreator<'a, C, W> where
    W: Unpin,
    <C as ToNativeWidget<W>>::PrefabData: Unpin

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

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

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

impl<'a, C = NoCustomUi, W = u32> !RefUnwindSafe for UiCreator<'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]