[][src]Trait leafrender::input::Input

pub trait Input {
    type Window: Drawer;
    fn update(&mut self, drawer: &mut Self::Window);
fn is_mouse_down(&self) -> bool;
fn get_mouse_pos(&self) -> (usize, usize);
fn do_continue(&self) -> bool;
fn new() -> Self; }

Handles basic input

Associated Types

Loading content...

Required methods

fn update(&mut self, drawer: &mut Self::Window)

Updates input

fn is_mouse_down(&self) -> bool

Checks to see if the mouse/pointer is down

fn get_mouse_pos(&self) -> (usize, usize)

Returns the current mouse position in a (x, y) tuple.

fn do_continue(&self) -> bool

Checks to see if execution should be continued

fn new() -> Self

Creates a new Input instance.

Loading content...

Implementors

impl Input for GlutinInput[src]

type Window = GlutinDrawer

Loading content...