Struct bevy_doryen::Input[][src]

pub struct Input { /* fields omitted */ }

Provides access to the input events handled by the Doryen engine. See the documentation for the InputApi type for details on what values should be used with the various key methods.

Implementations

impl Input[src]

pub fn key(&self, key: &str) -> bool[src]

Returns the current status of the given key (true if currently pressed).

pub fn key_pressed(&self, key: &str) -> bool[src]

Returns true if the given key was pressed since the last update.

pub fn keys_pressed(&self) -> Keys<'_>

Notable traits for Keys<'a>

impl<'a> Iterator for Keys<'a> type Item = &'a str;
[src]

Returns an iterator over all the keys that were pressed since the last update in no particular order.

pub fn key_released(&self, key: &str) -> bool[src]

Returns true if the given key was released since the last update.

pub fn keys_released(&self) -> Keys<'_>

Notable traits for Keys<'a>

impl<'a> Iterator for Keys<'a> type Item = &'a str;
[src]

Returns an iterator over all the keys that were released since the last update in no particular order.

pub fn text(&self) -> &str[src]

Characters typed since last update.

pub fn mouse_button(&self, mouse_button: MouseButton) -> bool[src]

Returns the current status of the given mouse button (true if currently pressed).

pub fn mouse_button_pressed(&self, mouse_button: MouseButton) -> bool[src]

Returns true if the given mouse button was pressed since the last update.

pub fn mouse_button_released(&self, mouse_button: MouseButton) -> bool[src]

Returns true if the given mouse button was released since the last update.

pub fn mouse_pos(&self) -> (f32, f32)[src]

Returns the current mouse position in console cells coordinates. The decimal part of the value indicates sub-cell location.

pub fn close_requested(&self) -> bool[src]

Whether the window close button has been activated.

Trait Implementations

impl Debug for Input[src]

impl Default for Input[src]

Auto Trait Implementations

impl RefUnwindSafe for Input

impl Send for Input

impl Sync for Input

impl Unpin for Input

impl UnwindSafe for Input

Blanket Implementations

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

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

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

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

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> Erased for T

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

impl<T> FromResources for T where
    T: Default
[src]

impl<T> Instrument for T[src]

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

impl<T> Resource for T where
    T: 'static + Send + Sync
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,