diff options
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/Event.h | 16 | ||||
-rw-r--r-- | src/crepe/api/LoopManager.h | 13 |
2 files changed, 23 insertions, 6 deletions
diff --git a/src/crepe/api/Event.h b/src/crepe/api/Event.h index d5ddf0a..ef6a791 100644 --- a/src/crepe/api/Event.h +++ b/src/crepe/api/Event.h @@ -87,6 +87,10 @@ public: //! Y-coordinate of the mouse position at the time of the event. int mouse_y = 0; + // Relative movement in x + int rel_x; + // Relative movement in y + int rel_y; }; /** @@ -113,3 +117,15 @@ public: class ShutDownEvent : public Event { public: }; + +class MouseScrollEvent : public Event { +public: + //! X-coordinate of the mouse position at the time of the event. + int scroll_x = 0; + + //! Y-coordinate of the mouse position at the time of the event. + int scroll_y = 0; + + int direction = 0; +}; + diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index f6904be..b18c9d1 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -10,6 +10,12 @@ namespace crepe { class LoopManager { public: void start(); + /** + * \brief Set game running variable + * + * \param running running (false = game shutdown, true = game running) + */ + void set_running(bool running); LoopManager(); private: @@ -53,12 +59,7 @@ private: * This function updates physics and game logic based on LoopTimer's fixed_delta_time. */ void fixed_update(); - /** - * \brief Set game running variable - * - * \param running running (false = game shutdown, true = game running) - */ - void set_running(bool running); + /** * \brief Function for executing render-related systems. * |