logo
pub trait PointerSystem {
    fn is_supported(&self) -> bool;
    fn down(&self) -> &Signal1<PointerEvent>;
    fn move_signal(&self) -> &Signal1<PointerEvent>;
    fn up_signal(&self) -> &Signal1<PointerEvent>;
    fn x(&self) -> f32;
    fn y(&self) -> f32;
    fn is_down(&self) -> bool;
}
Expand description

Functions related to the environment’s pointing device. On desktop computers, this is a mouse. On touch screens, it’s a finger.

Required Methods

True if the environment has a pointing device.

Emitted when the pointing device is pressed down (when the mouse button is held or a finger is pressed to the screen).

Emitted when the pointing device moves while over the stage.

Emitted when the pointing device is released (when the mouse button is released or the finger is lifted from the screen).

The last recorded X coordinate of the pointer.

The last recorded Y coordinate of the pointer.

True if the pointer is currently pressed down.

Implementors