Trait piston::input::CursorEvent
[−]
pub trait CursorEvent { fn from_cursor(cursor: bool, old_event: &Self) -> Option<Self>; fn cursor<U, F>(&self, f: F) -> Option<U> where F: FnMut(bool) -> U; fn cursor_args(&self) -> Option<bool> { ... } }
When window gets or loses cursor
Required Methods
fn from_cursor(cursor: bool, old_event: &Self) -> Option<Self>
Creates a cursor event.
fn cursor<U, F>(&self, f: F) -> Option<U> where F: FnMut(bool) -> U
Calls closure if this is a cursor event.
Provided Methods
fn cursor_args(&self) -> Option<bool>
Returns cursor arguments.
Implementors
impl<T> CursorEvent for T where T: GenericEvent