Dualie
|
A namespace that encapsulates all input-related functions and enumerations. More...
Enumerations | |
enum | InputType { PRESSED = 0 , HELD , RELEASED } |
enum | Key { A = BIT(0) , B = BIT(1) , SELECT = BIT(2) , START = BIT(3) , DRIGHT = BIT(4) , DLEFT = BIT(5) , DUP = BIT(6) , DDOWN = BIT(7) , R = BIT(8) , L = BIT(9) , X = BIT(10) , Y = BIT(11) , ZL = BIT(14) , ZR = BIT(15) , TOUCH = BIT(20) , CSTICK_RIGHT = BIT(24) , CSTICK_LEFT = BIT(25) , CSTICK_UP = BIT(26) , CSTICK_DOWN = BIT(27) , CPAD_RIGHT = BIT(28) , CPAD_LEFT = BIT(29) , CPAD_UP = BIT(30) , CPAD_DOWN = BIT(31) , UP = DUP | CPAD_UP , DOWN = DDOWN | CPAD_DOWN , LEFT = DLEFT | CPAD_LEFT , RIGHT = DRIGHT | CPAD_RIGHT } |
Functions | |
bool | isKeyPressed (Key key) |
Returns whether a certain key was pressed that frame. Note that this does not capture held buttons. | |
bool | isKeyHeld (Key key) |
Returns whether a certain key was held that frame. | |
bool | isKeyReleased (Key key) |
Returns whether a certain key was released that frame. | |
void | updateInput () |
Variables | |
u32 | KeyPressedMask = 0 |
u32 | KeyHeldMask = 0 |
u32 | KeyReleasedMask = 0 |
float | SliderValue = 0 |
dl::Vector2f | TouchPosition = dl::Vector2f(0,0) |
The touch position of the screen. If the screen is not touched, This will be (0,0). See LastTouchPosition. | |
dl::Vector2f | LastTouchPosition = dl::Vector2f(0,0) |
The touch position of the screen. If the screen is not touched, This will be the last valid touch of the screen. See TouchPosition. | |
A namespace that encapsulates all input-related functions and enumerations.
enum dl::Input::Key |
bool dl::Input::isKeyHeld | ( | Key | key | ) |
Returns whether a certain key was held that frame.
key | The button to check |
bool dl::Input::isKeyPressed | ( | Key | key | ) |
Returns whether a certain key was pressed that frame. Note that this does not capture held buttons.
key | The button to check |
bool dl::Input::isKeyReleased | ( | Key | key | ) |
Returns whether a certain key was released that frame.
key | The button to check |