Struct glerminal::input::Input [] [src]

pub struct Input { /* fields omitted */ }

Input contains the necessary infoamtions to satisfy all your input-gathering needs!

It's usage is quite simple, but an Input must be retrieved via a Terminal. Example:

use glerminal::terminal::TerminalBuilder;
use glerminal::VirtualKeyCode;

let terminal = TerminalBuilder::new()
    .with_title("Hello GLerminal!")
    .with_dimensions((1280, 720))
    .build();

let current_input = terminal.get_current_input();
if current_input.was_just_pressed(VirtualKeyCode::E) {
    println!("E was just pressed!");
}

Methods

impl Input
[src]

[src]

Returns wether the keycode is currently pressed. Does not care when it was pressed.

[src]

Returns wether the keycode was pressed this frame.

[src]

Returns wether the keycode was released this frame.

Trait Implementations

impl Clone for Input
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Input

impl Sync for Input