Handles keyboard and mouse input.
More...
#include <input.h>
|
static void | init () |
| Initialise the input system. More...
|
|
static void | shutdown () |
| Free resources occupied by the input system. More...
|
|
static void | update () |
| Update the input state. More...
|
|
static bool | is_pushed (SDL_Keycode key) |
| Returns whether a key is currently pushed or not. More...
|
|
static bool | has_been_pushed (SDL_Keycode key) |
| Returns whether a key has been pushed since last function call, false otherwise. More...
|
|
static SDL_Keycode | get_next_key () |
| Returns the code of the next key on the input queue. More...
|
|
static std::string | get_next_unicode () |
| Returns the next text input on the input queue encoded as utf8. More...
|
|
static void | start_text_input () |
|
static void | stop_text_input () |
|
static bool | is_text_input () |
|
static void | clear_keys_queue () |
| Totally clears the key queue. More...
|
|
Handles keyboard and mouse input.
- Todo:
- Rewrite it!
Definition at line 47 of file input.h.
Initialise the input system.
Definition at line 48 of file input.cc.
Free resources occupied by the input system.
Definition at line 59 of file input.cc.
Update the input state.
Definition at line 64 of file input.cc.
bool input::is_pushed |
( |
SDL_Keycode |
key | ) |
|
|
static |
Returns whether a key is currently pushed or not.
- Parameters
-
- Returns
- true if key is currently pushed, false otherwise.
Definition at line 110 of file input.cc.
bool input::has_been_pushed |
( |
SDL_Keycode |
key | ) |
|
|
static |
Returns whether a key has been pushed since last function call, false otherwise.
- Parameters
-
- Returns
- true if the key has been pushed since last call, false otherwise.
Definition at line 119 of file input.cc.
SDL_Keycode input::get_next_key |
( |
| ) |
|
|
static |
Returns the code of the next key on the input queue.
- Returns
- Code of the next key that has been pushed.
Definition at line 128 of file input.cc.
std::string input::get_next_unicode |
( |
| ) |
|
|
static |
Returns the next text input on the input queue encoded as utf8.
- Returns
- utf8 representation of the next character that has been input.
Definition at line 143 of file input.cc.
void input::clear_keys_queue |
( |
| ) |
|
|
static |
Totally clears the key queue.
Definition at line 168 of file input.cc.
The documentation for this class was generated from the following files: