diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-15 22:43:37 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-15 22:43:37 +0100 |
commit | ff969f4e676d8cb565da1581733a35eb64eb03c6 (patch) | |
tree | 7962073482805aad59c6ab8a29362bef7666a021 /src/crepe/api/Script.h | |
parent | 60f8b69876919a4010406f83b6a32e9153af1ad5 (diff) |
added keystate
Diffstat (limited to 'src/crepe/api/Script.h')
-rw-r--r-- | src/crepe/api/Script.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h index dcecc07..b5d3dd2 100644 --- a/src/crepe/api/Script.h +++ b/src/crepe/api/Script.h @@ -143,6 +143,14 @@ protected: * */ 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; //! \} private: |