From ff969f4e676d8cb565da1581733a35eb64eb03c6 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Sun, 15 Dec 2024 22:43:37 +0100 Subject: added keystate --- src/crepe/api/Script.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/crepe/api/Script.h') 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: -- cgit v1.2.3