Struct nannou::state::mouse::Mouse
[−]
[src]
pub struct Mouse<S = DefaultScalar> { pub window: Option<Id>, pub x: S, pub y: S, pub buttons: ButtonMap, }
The state of the Mouse
at a single moment in time.
Fields
window: Option<Id>
The ID of the last window currently in focus.
x: S
x position relative to the middle of window
.
y: S
y position relative to the middle of window
.
A map describing the state of each mouse button.
Methods
impl<S> Mouse<S> where
S: BaseFloat,
[src]
S: BaseFloat,
pub fn new() -> Self
[src]
Construct a new default Mouse
.
pub fn position(&self) -> Point2<S>
[src]
The position of the mouse relative to the middle of the window in focus..
Trait Implementations
impl<S: Copy> Copy for Mouse<S>
[src]
impl<S: Clone> Clone for Mouse<S>
[src]
fn clone(&self) -> Mouse<S>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S: Debug> Debug for Mouse<S>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more