pub enum HatState {
Centered = 0,
Up = 1,
Right = 2,
Down = 4,
Left = 8,
RightUp = 3,
RightDown = 6,
LeftUp = 9,
LeftDown = 12,
}
Expand description
This is represented in SDL2 as a bitfield but obviously not all combinations make sense: 5 for instance would mean up and down at the same time… To simplify things I turn it into an enum which is how the SDL2 docs present it anyway (using macros).
Variants§
Implementations§
Trait Implementations§
impl Copy for HatState
impl Eq for HatState
impl StructuralPartialEq for HatState
Auto Trait Implementations§
impl Freeze for HatState
impl RefUnwindSafe for HatState
impl Send for HatState
impl Sync for HatState
impl Unpin for HatState
impl UnwindSafe for HatState
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)