From 9cce00687e9ee318d72fd66793d070da2424fcbc Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Wed, 4 Dec 2024 16:50:42 +0100 Subject: feedback changes --- src/crepe/api/Button.h | 6 +++--- src/crepe/system/InputSystem.cpp | 7 +++---- src/crepe/system/InputSystem.h | 9 +++------ 3 files changed, 9 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/crepe/api/Button.h b/src/crepe/api/Button.h index 290bb2f..06d64d6 100644 --- a/src/crepe/api/Button.h +++ b/src/crepe/api/Button.h @@ -42,7 +42,7 @@ public: * This function is invoked whenever the button is clicked. It can be set to any * function that matches the signature `void()`. */ - std::function on_click; + std::function on_click = nullptr; /** * \brief Callback function to be executed when the mouse enters the button's boundaries. @@ -50,7 +50,7 @@ public: * This function is triggered when the mouse cursor moves over the button, allowing * custom actions like visual effects, highlighting, or sound effects. */ - std::function on_enter; + std::function on_enter = nullptr; /** * \brief Callback function to be executed when the mouse exits the button's boundaries. @@ -58,7 +58,7 @@ public: * This function is triggered when the mouse cursor moves out of the button's area, * allowing custom actions like resetting visual effects or playing exit-related effects. */ - std::function on_exit; + std::function on_exit = nullptr; private: friend class InputSystem; diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp index 72d728c..dca621e 100644 --- a/src/crepe/system/InputSystem.cpp +++ b/src/crepe/system/InputSystem.cpp @@ -11,11 +11,11 @@ void InputSystem::update() { std::vector event_list = SDLContext::get_instance().get_events(); RefVector