pub enum PointerButton {
Left,
Right,
Middle,
Back,
Forward,
Other(u16),
}Expand description
Input vocabulary, defined in crcbl_core::input and re-exported so a
consumer of the event stream needs one use rather than two.
See the crate docs for why these live in crcbl-core.
A button on a pointing device.
Named by role, not by physical position: Left is the primary button even
on a left-handed mouse, because that is the swap the OS already applied and
the game must not apply again.
Variants§
Left
Primary button.
Right
Secondary (context-menu) button.
Middle
Wheel click.
Back
Thumb button that means “back” — BTN_SIDE, XBUTTON1.
Forward
Thumb button that means “forward” — BTN_EXTRA, XBUTTON2.
Other(u16)
Anything else, by platform-assigned index.
Bindable and loggable, never interpreted by the engine.
Trait Implementations§
Source§impl Clone for PointerButton
impl Clone for PointerButton
Source§fn clone(&self) -> PointerButton
fn clone(&self) -> PointerButton
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PointerButton
Source§impl Debug for PointerButton
impl Debug for PointerButton
impl Eq for PointerButton
Source§impl Hash for PointerButton
impl Hash for PointerButton
Source§impl Ord for PointerButton
impl Ord for PointerButton
Source§fn cmp(&self, other: &PointerButton) -> Ordering
fn cmp(&self, other: &PointerButton) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PointerButton
impl PartialEq for PointerButton
Source§impl PartialOrd for PointerButton
impl PartialOrd for PointerButton
impl StructuralPartialEq for PointerButton
Auto Trait Implementations§
impl Freeze for PointerButton
impl RefUnwindSafe for PointerButton
impl Send for PointerButton
impl Sync for PointerButton
impl Unpin for PointerButton
impl UnsafeUnpin for PointerButton
impl UnwindSafe for PointerButton
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