GameKit
0.0.1a
C++ gamedev tools
|
Give access to the real time state of an input handler. More...
#include <GamePad.hpp>
Static Public Member Functions | |
static void | init (InputHandler &_inputHandler) |
Initialize with an InputHandler. More... | |
static bool | isKeyPressed (GameKey key) |
Check if a key is pressed. More... | |
static bool | isKeyPressedOnce (GameKey key) |
Check if a key is pressed only one time. More... | |
static bool | isKeyPressedWithDelay (GameKey key, u16 delay) |
Check if a key is pressed with delay. More... | |
static InputHandler * | getInputHandler () |
Get the current input handler. More... | |
Static Private Attributes | |
static InputHandler * | inputHandler = nullptr |
Current input handler. More... | |
Give access to the real time state of an input handler.
gk::GamePad provides an interface to the state of the keyboard.
Definition at line 25 of file GamePad.hpp.
|
inlinestatic |
Get the current input handler.
Definition at line 78 of file GamePad.hpp.
|
inlinestatic |
Initialize with an InputHandler.
_inputHandler | The gk::InputHandler to be bound to the GamePad |
This function has to be called at init in your gk::CoreApplication subclass, with your own gk::InputHandler
Definition at line 37 of file GamePad.hpp.
|
static |
Check if a key is pressed.
key | Key to check |
Definition at line 20 of file GamePad.cpp.
|
static |
Check if a key is pressed only one time.
key | Key to check |
Definition at line 24 of file GamePad.cpp.
Check if a key is pressed with delay.
key | Key to check |
delay | Delay between key presses (in milliseconds) |
Definition at line 28 of file GamePad.cpp.
|
staticprivate |
Current input handler.
Definition at line 84 of file GamePad.hpp.