Trait components::engine::d2::subsystem::PointerSystem
source · [−]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
fn is_supported(&self) -> bool
fn is_supported(&self) -> bool
True if the environment has a pointing device.
fn down(&self) -> &Signal1<PointerEvent>
fn down(&self) -> &Signal1<PointerEvent>
Emitted when the pointing device is pressed down (when the mouse button is held or a finger is pressed to the screen).
fn move_signal(&self) -> &Signal1<PointerEvent>
fn move_signal(&self) -> &Signal1<PointerEvent>
Emitted when the pointing device moves while over the stage.
fn up_signal(&self) -> &Signal1<PointerEvent>
fn up_signal(&self) -> &Signal1<PointerEvent>
Emitted when the pointing device is released (when the mouse button is released or the finger is lifted from the screen).