logo
pub trait MouseSystem {
    fn is_supported(&self) -> bool;
    fn down_signal(&self) -> &Signal1<MouseEvent>;
    fn move_signal(&self) -> &Signal1<MouseEvent>;
    fn up_signal(&self) -> &Signal1<MouseEvent>;
    fn scroll_signal(&self) -> &Signal1<f32>;
    fn x(&self) -> f32;
    fn y(&self) -> f32;
    fn cursor(&self) -> MouseCursor;
    fn is_down(&self, button: MouseButton) -> bool;
}
Expand description

Functions related to the environment’s mouse.

Required Methods

True if the environment has a mouse.

Emitted when a mouse button is pressed down.

Emitted when the mouse cursor is moved while over the stage.

Emitted when a mouse button is released.

A velocity emitted when the mouse wheel or trackpad is scrolled. A positive value is an upward scroll, negative is a downward scroll. Typically, each scroll wheel “click” equates to 1 velocity.

The last recorded X coordinate of the mouse.

The last recorded Y coordinate of the mouse.

The style of the mouse cursor.

@returns True if the given button is currently being held down.

Implementors