|
Arcade Shooter
|
Handles the state of multiple player input devices. More...
#include <InputState.h>
Public Member Functions | |
| bool | IsKeyDown (Key key) const |
| Determines if a keyboard key is currently being pressed down. More... | |
| bool | IsKeyUp (Key key) const |
| Determines if a keyboard key is currently not being pressed down. More... | |
| bool | IsNewKeyPress (Key key) const |
| Determines if a keyboard key was just pressed this frame. More... | |
| bool | IsNewKeyRelease (Key key) const |
| Determines if a keyboard key was just released this frame. More... | |
| Point | GetMousePosition () const |
| Gets the current screen position of the mouse cursor. More... | |
| bool | IsMouseButtonDown (MouseButton button) const |
| Determines if a mouse button is currently being pressed down. More... | |
| bool | IsMouseButtonUp (MouseButton button) const |
| Determines if a mouse button is currently not being pressed down. More... | |
| bool | WasMouseButtonDown (MouseButton button) const |
| Determines if a mouse button was being pressed down during the previous frame. More... | |
| bool | WasMouseButtonUp (MouseButton button) const |
| Determines if a mouse button was not being pressed down during the previous frame. More... | |
| bool | IsNewMouseButtonPress (MouseButton button) const |
| Determines if a mouse button was just pressed this frame. More... | |
| bool | IsNewMouseButtonRelease (MouseButton button) const |
| Determines if a mouse button was just released this frame. More... | |
| bool | IsButtonUp (Button button, int8_t &indexOut, int8_t controllingIndex=-1) const |
| Determines if a the button on an Xbox controller is up. More... | |
| bool | IsButtonDown (Button button, int8_t &indexOut, int8_t controllingIndex=-1) const |
| Determines if a the button on an Xbox controller is down. More... | |
| bool | IsNewButtonPress (Button button, int8_t &indexOut, int8_t controllingIndex=-1) const |
| Determines if a the button on an Xbox controller was just pressed this frame. More... | |
| bool | IsNewButtonRelease (Button button, int8_t &indexOut, int8_t controllingIndex=-1) const |
| Determines if a the button on an Xbox controller just released this frame. More... | |
| GamePadState | GetGamePadState (const int8_t gamePadIndex) const |
| Get the current state of an Xbox controller. More... | |
Static Public Attributes | |
| static const uint8_t | MAX_NUM_GAMEPADSTATES = 4 |
| The maximum number of Xbox controllers that the system can manage. | |
Friends | |
| class | Game |
Handles the state of multiple player input devices.
| GamePadState KatanaEngine::InputState::GetGamePadState | ( | const int8_t | gamePadIndex | ) | const |
Get the current state of an Xbox controller.
| gamePadIndex | The index of the desired game pad state. |
|
inline |
Gets the current screen position of the mouse cursor.
| bool KatanaEngine::InputState::IsButtonDown | ( | Button | button, |
| int8_t & | indexOut, | ||
| int8_t | controllingIndex = -1 |
||
| ) | const |
Determines if a the button on an Xbox controller is down.
| button | The button to test. |
| indexOut | The index of the controller with the pressed button. |
| controllingIndex | The index of the controller to test. If the controllingIndex is not valid, all controllers will be tested indexOut will be set to the first detected index matching the condition. |
| bool KatanaEngine::InputState::IsButtonUp | ( | Button | button, |
| int8_t & | indexOut, | ||
| int8_t | controllingIndex = -1 |
||
| ) | const |
Determines if a the button on an Xbox controller is up.
| button | The button to test. |
| indexOut | The index of the controller with the released button. |
| controllingIndex | The index of the controller to test. If the controllingIndex is not valid, all controllers will be tested indexOut will be set to the first detected index matching the condition. |
| bool KatanaEngine::InputState::IsKeyDown | ( | Key | key | ) | const |
Determines if a keyboard key is currently being pressed down.
| key | The key to test. |
| bool KatanaEngine::InputState::IsKeyUp | ( | Key | key | ) | const |
Determines if a keyboard key is currently not being pressed down.
| key | The key to test. |
|
inline |
Determines if a mouse button is currently being pressed down.
| button | The button to test. |
|
inline |
Determines if a mouse button is currently not being pressed down.
| button | The button to test. |
| bool KatanaEngine::InputState::IsNewButtonPress | ( | Button | button, |
| int8_t & | indexOut, | ||
| int8_t | controllingIndex = -1 |
||
| ) | const |
Determines if a the button on an Xbox controller was just pressed this frame.
| button | The button to test. |
| indexOut | The index of the controller with the pressed button. |
| controllingIndex | The index of the controller to test. If the controllingIndex is not valid, all controllers will be tested indexOut will be set to the first detected index matching the condition. |
| bool KatanaEngine::InputState::IsNewButtonRelease | ( | Button | button, |
| int8_t & | indexOut, | ||
| int8_t | controllingIndex = -1 |
||
| ) | const |
Determines if a the button on an Xbox controller just released this frame.
| button | The button to test. |
| indexOut | The index of the controller with the released button. |
| controllingIndex | The index of the controller to test. If the controllingIndex is not valid, all controllers will be tested indexOut will be set to the first detected index matching the condition. |
| bool KatanaEngine::InputState::IsNewKeyPress | ( | Key | key | ) | const |
Determines if a keyboard key was just pressed this frame.
| key | The key to test. |
| bool KatanaEngine::InputState::IsNewKeyRelease | ( | Key | key | ) | const |
Determines if a keyboard key was just released this frame.
| key | The key to test. |
|
inline |
Determines if a mouse button was just pressed this frame.
| button | The button to test. |
|
inline |
Determines if a mouse button was just released this frame.
| button | The button to test. |
|
inline |
Determines if a mouse button was being pressed down during the previous frame.
| button | The button to test. |
|
inline |
Determines if a mouse button was not being pressed down during the previous frame.
| button | The button to test. |
1.8.13