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