pub struct MouseDetectResult {Show 24 fields
pub clicked: bool,
pub contains_pointer: bool,
pub secondary_clicked: Option<bool>,
pub middle_clicked: Option<bool>,
pub clicked_by_extra_button: Option<[bool; 2]>,
pub long_touched: Option<bool>,
pub double_clicked: Option<bool>,
pub triple_clicked: Option<bool>,
pub double_clicked_by: Option<[bool; 5]>,
pub triple_clicked_by: Option<[bool; 5]>,
pub clicked_elsewhere: Option<bool>,
pub hovered: Option<bool>,
pub drag_started: Option<bool>,
pub drag_started_by: Option<[bool; 5]>,
pub dragged: Option<bool>,
pub dragged_by: Option<[bool; 5]>,
pub drag_stopped: Option<bool>,
pub deag_stopped_by: Option<[bool; 5]>,
pub drag_delta: Option<[f32; 2]>,
pub total_drag_delta: Option<Option<[f32; 2]>>,
pub drag_motion: Option<[f32; 2]>,
pub interact_pointer_pos: Option<Option<[f32; 2]>>,
pub hover_pos: Option<Option<[f32; 2]>>,
pub is_pointer_button_down_on: Option<bool>,
}Expand description
鼠标检测器检测结果。
Fields§
§clicked: bool是否点击。
contains_pointer: bool鼠标是否在检测范围内。
secondary_clicked: Option<bool>是否点击右键。
middle_clicked: Option<bool>是否点击中键。
是否点击扩展按键。
long_touched: Option<bool>是否长时间触屏。
double_clicked: Option<bool>是否双击。
triple_clicked: Option<bool>是否三击。
double_clicked_by: Option<[bool; 5]>双击的方法。
triple_clicked_by: Option<[bool; 5]>三击的方法。
clicked_elsewhere: Option<bool>是否在检测范围外点击。
hovered: Option<bool>是否悬挂在检测范围内。
drag_started: Option<bool>是否开始拖动。
drag_started_by: Option<[bool; 5]>开始拖动的方法。
dragged: Option<bool>是否正在拖动。
dragged_by: Option<[bool; 5]>拖动方法。
drag_stopped: Option<bool>是否结束拖动。
deag_stopped_by: Option<[bool; 5]>结束拖动方法。
drag_delta: Option<[f32; 2]>上一帧拖动经过了多少格像素。
total_drag_delta: Option<Option<[f32; 2]>>一次拖动中总共经过了多少格像素。
drag_motion: Option<[f32; 2]>鼠标上一帧拖动了多远。
interact_pointer_pos: Option<Option<[f32; 2]>>鼠标交互的位置。
hover_pos: Option<Option<[f32; 2]>>鼠标悬挂的位置。
鼠标是否按下按键。
Trait Implementations§
Source§impl Clone for MouseDetectResult
impl Clone for MouseDetectResult
Source§fn clone(&self) -> MouseDetectResult
fn clone(&self) -> MouseDetectResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MouseDetectResult
impl Debug for MouseDetectResult
Source§impl Default for MouseDetectResult
impl Default for MouseDetectResult
Source§fn default() -> MouseDetectResult
fn default() -> MouseDetectResult
Returns the “default value” for a type. Read more
Source§impl PartialEq for MouseDetectResult
impl PartialEq for MouseDetectResult
Source§impl PartialOrd for MouseDetectResult
impl PartialOrd for MouseDetectResult
impl StructuralPartialEq for MouseDetectResult
Auto Trait Implementations§
impl Freeze for MouseDetectResult
impl RefUnwindSafe for MouseDetectResult
impl Send for MouseDetectResult
impl Sync for MouseDetectResult
impl Unpin for MouseDetectResult
impl UnwindSafe for MouseDetectResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().