Trait n18ui::state::UiState[][src]

pub trait UiState {
    fn draw(&self, assets: &Assets, ctx: &Context);

    fn ping(
        &mut self,
        _assets: &mut Assets,
        _controller: &mut Controller
    ) -> (UiResponse, Option<State>) { ... } }
Expand description

The methods that are required in order to manipulate the user interface.

Required methods

Draws the current state of the map.

Note that this method should not draw a background by filling the entire surface, because this makes it impossible to determine the appropriate surface dimensions.

Provided methods

Trait Implementations

Performs the conversion.

Note the 'static lifetime in the return type, which is necessary for this to compile. See this thread on the Rust forum, and how static lifetimes apply to trait bounds:

As a trait bound, it means the type does not contain any non-static references. E.g., the receiver can hold on to the type for as long as they want and it will never become invalid until they drop it.

Performs the conversion.

Implementors