[][src]Struct egui::MouseInput

pub struct MouseInput {
    pub down: bool,
    pub pressed: bool,
    pub released: bool,
    pub could_be_click: bool,
    pub click: bool,
    pub double_click: bool,
    pub last_click_time: f64,
    pub pos: Option<Pos2>,
    pub press_origin: Option<Pos2>,
    pub delta: Vec2,
    pub velocity: Vec2,
    // some fields omitted
}

What egui maintains

Fields

down: bool

Is the button currently down? true the frame when it is pressed, false the frame it is released.

pressed: bool

The mouse went from !down to down

released: bool

The mouse went from down to !down

could_be_click: bool

If the mouse is down, will it register as a click when released? Set to true on mouse down, set to false when mouse moves too much.

click: bool

Was there a click? Did a mouse button get released this frame closely after going down?

double_click: bool

Was there a double-click?

last_click_time: f64

When did the mouse get click last? Used to check for double-clicks.

pos: Option<Pos2>

Current position of the mouse in points. None for touch screens when finger is not down.

press_origin: Option<Pos2>

Where did the current click/drag originate?

delta: Vec2

How much the mouse moved compared to last frame, in points.

velocity: Vec2

Current velocity of mouse cursor.

Implementations

impl MouseInput[src]

#[must_use]pub fn begin_frame(self, new: &RawInput) -> MouseInput[src]

impl MouseInput[src]

pub fn ui(&self, ui: &mut Ui)[src]

Trait Implementations

impl Clone for MouseInput[src]

impl Debug for MouseInput[src]

impl Default for MouseInput[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.