diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-17 15:43:49 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-17 15:43:49 +0100 |
commit | 4dd30ea92296892c9a9bd94787531d6a1319d8ac (patch) | |
tree | 5df2de26f7f6f3170c06c77d8ae21ce635217356 /src/crepe/api/Script.h | |
parent | 6e92c59b3364b00eb15c310120b93acc83ca504e (diff) | |
parent | a8ccf7fe8662086bb223aa4eafd0f85e717d16cf (diff) |
Merge remote-tracking branch 'origin/master' into jaro/collision-system-handeling
Diffstat (limited to 'src/crepe/api/Script.h')
-rw-r--r-- | src/crepe/api/Script.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h index 668e5d1..65306cd 100644 --- a/src/crepe/api/Script.h +++ b/src/crepe/api/Script.h @@ -2,6 +2,7 @@ #include <vector> +#include "../api/KeyCodes.h" #include "../manager/EventManager.h" #include "../manager/Mediator.h" #include "../system/CollisionSystem.h" @@ -134,7 +135,22 @@ protected: //! Retrieve SaveManager reference SaveManager & get_save_manager() const; - + /** + * \brief Utility function to retrieve the keyboard state + * \see SDLContext::get_keyboard_state + * + * \return current keyboard state map with Keycode as key and bool as value(true = pressed, false = not pressed) + * + */ + const keyboard_state_t & get_keyboard_state() const; + /** + * \brief Utility function to retrieve a single key state. + * \see SDLContext::get_keyboard_state + * + * \return Keycode state (true if pressed, false if not pressed). + * + */ + bool get_key_state(Keycode key) const noexcept; //! \} private: |