Input handler wrapper.
More...
#include <input.h>
|
static void | Init () |
| Initialize the input manager.
|
|
static void | PollEvent () |
| Read event input.
|
|
static bool | KeyDown (std::string keyCode) |
|
static bool | KeyDown (int keyCode) |
|
static bool | MouseClick (int button) |
|
static bool | MouseDown (int button) |
|
static SDL_MouseButtonEvent | GetClick () |
| Get the mouse button event.
|
|
static bool | MouseMotion () |
| Check if the mouse moved.
|
|
static SDL_MouseMotionEvent | GetMotion () |
| Get the mouse motion.
|
|
static Vector2f | MousePos () |
| Get the current mouse position.
|
|
static float | GetJoyAxis (int axis) |
|
static bool | GetJoyButton (int button) |
|
static int | GetJoyHat (int hat) |
|
static bool | JoystickAvailable () |
| Check if a Joystick is available.
|
|
static bool | JoySupportsHaptic () |
| Check if the Joystick has haptic support (force feedback)
|
|
static bool | Quit () |
| Check if the program has been quit out of.
|
|
static void | Clear () |
| Clear input data, used when changing states to clear old input.
|
|
static void | Close () |
| Close the joystick and any other input items that need to be exited.
|
|
Input handler wrapper.
A simple wrapper around SDL's input handling system
float Input::GetJoyAxis |
( |
int |
axis | ) |
|
|
static |
Get the input level of the desired joystick axis input level value ranges from -1 to 1
- Parameters
-
axis | The axis to get value from |
- Returns
- The input level of the axis, from -1 to 1
bool Input::GetJoyButton |
( |
int |
button | ) |
|
|
static |
Check if a Joystick button is being pressed
- Parameters
-
button | The button to check |
- Returns
- T/F whether or not the button is being pushed
int Input::GetJoyHat |
( |
int |
hat | ) |
|
|
static |
Check the position of the Joystick hat
- Parameters
-
hat | The hat to check position of |
- Returns
- The position of the hat
bool Input::KeyDown |
( |
std::string |
keyCode | ) |
|
|
static |
Check if a key is being pressed down
- Parameters
-
keyCode | The string of the key to check, ex: 'a' |
- Returns
- T if key is down
bool Input::KeyDown |
( |
int |
keyCode | ) |
|
|
static |
Check if a key is being pressed down
- Parameters
-
keyCode | The SDL_SCANCODE of the key |
- Returns
- T if key is down
bool Input::MouseClick |
( |
int |
button | ) |
|
|
static |
Check if the mouse button is clicked
- Parameters
-
button | The button to check |
bool Input::MouseDown |
( |
int |
button | ) |
|
|
static |
Check if the mouse button is currently down
- Parameters
-
button | The button to check |
The documentation for this class was generated from the following files:
- C:/Users/Will/Documents/Programs/LPCGame/src/core/input.h
- C:/Users/Will/Documents/Programs/LPCGame/src/core/input.cpp