[−][src]Struct pokemon_rust::entities::text_box::TextBox

pub struct TextBox {
    pub full_text: String,
    pub displayed_text_start: usize,
    pub displayed_text_end: usize,
    pub awaiting_keypress: bool,
    pub cooldown: f32,
    pub box_entity: Entity,
    pub text_entity: Entity,
}

A component used for rendering text.

Fields

full_text: String

The entire text that should be displayed. Doesn't necessarily fit in a single page.

displayed_text_start: usize

The index of the first character to be displayed in the current page.

displayed_text_end: usize

The index after the last character to be displayed in the current page. This varies over time (see TextSystem) to make the text appear progressively.

awaiting_keypress: bool

Whether or not this text box is waiting for a keypress to go on to the next page (or close if this is the last page).

cooldown: f32

Used to measure the elapsed time since the last character was displayed. This is used to make the text appear progressively in a constant speed.

box_entity: Entity

The entity corresponding to the box that this text appears in.

text_entity: Entity

The entity corresponding to the text that displays this struct.

Trait Implementations

impl Component for TextBox[src]

type Storage = DenseVecStorage<Self>

Associated storage type for this component.

Auto Trait Implementations

impl RefUnwindSafe for TextBox

impl Send for TextBox

impl Sync for TextBox

impl Unpin for TextBox

impl UnwindSafe for TextBox

Blanket Implementations

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]

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

impl<T> Any for T where
    T: Any, 

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

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

impl<T> Erased for T

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

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

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

impl<T> Resource for T where
    T: Any + Send + Sync, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> Supports<T> for T

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<V, T> VZip<V> for T where
    V: MultiLane<T>,