Trait piston::mouse::MouseCursorEvent [−][src]
pub trait MouseCursorEvent { pub fn from_pos(pos: [f64; 2], old_event: &Self) -> Option<Self>; pub fn mouse_cursor<U, F>(&self, f: F) -> Option<U>
where
F: FnMut([f64; 2]) -> U; pub fn mouse_cursor_args(&self) -> Option<[f64; 2]> { ... } }
The position of the mouse cursor.
Required methods
pub fn from_pos(pos: [f64; 2], old_event: &Self) -> Option<Self>
[src]
Creates a mouse cursor event.
Preserves time stamp from original input event, if any.
pub fn mouse_cursor<U, F>(&self, f: F) -> Option<U> where
F: FnMut([f64; 2]) -> U,
[src]
F: FnMut([f64; 2]) -> U,
Calls closure if this is a mouse cursor event.