Struct dotrix_core::input::Input[][src]

pub struct Input {
    pub events: Vec<Event>,
    pub modifiers: Modifiers,
    // some fields omitted
}
Expand description

Input Service

Collects input events, tracks state changes and provides mapping to game actions

Fields

events: Vec<Event>

events collector

modifiers: Modifiers

modifiers collector

Implementations

Returns the status of the mapped action.

Returns the status of the raw input

Checks if mapped action button is pressed

Checks if mapped action button is released

Checks if mapped button is pressed or hold

Set custom ActionMapper

Get input mapper reference

Get mutual mapper reference

Set window size

Mouse scroll delta

Value can be positive (up) or negative (down)

Current mouse position in pixel coordinates. The top-left of the window is at (0, 0)

Difference of the mouse position from the last frame in pixel coordinates

The top-left of the window is at (0, 0).

Returns true if mouse was moved this frame.

This can be handy to do quick check before doing some performance costly operation.

Normalized mouse position

The top-left of the window is at (0, 0), bottom-right at (1, 1)

Trait Implementations

Input service constructor

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more