From a3e418c1a48a057d82fc3faf927ebf1cd3da7227 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Tue, 17 Dec 2024 20:48:34 +0100 Subject: feedback --- src/crepe/api/Button.h | 8 ++++---- src/crepe/system/InputSystem.cpp | 18 ++++-------------- src/crepe/system/InputSystem.h | 18 +++++++++--------- src/test/InputTest.cpp | 6 +++--- 4 files changed, 20 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/crepe/api/Button.h b/src/crepe/api/Button.h index 0f446c9..d42527e 100644 --- a/src/crepe/api/Button.h +++ b/src/crepe/api/Button.h @@ -13,9 +13,9 @@ namespace crepe { * This component creates a clickable surface at the transform location with the specified width and height. * * The Button can be used in scripts by subscribing a EventHandler to the following events: - * - **ButtonPressEvent**: Triggered when the surface is clicked with the mouse. Contains GameObject metadata. - * - **MouseEnterEvent**: Triggered when the mouse enters the button area. Contains GameObject metadata. - * - **MouseExitEvent**: Triggered when the mouse leaves the button area. Contains GameObject metadata. + * - ButtonPressEvent + * - ButtonEnterEvent + * - ButtonExitEvent * \see EventManager * */ @@ -34,7 +34,7 @@ public: * * Since the button Event transfers the GameObject Metadata it will be the same for each button so only one button is allowed per GameObject * - * \return The maximum number of instances for this component + * \return 1 */ virtual int get_instances_max() const { return 1; } diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp index e42eaeb..34aad06 100644 --- a/src/crepe/system/InputSystem.cpp +++ b/src/crepe/system/InputSystem.cpp @@ -10,10 +10,8 @@ using namespace crepe; void InputSystem::update() { ComponentManager & mgr = this->mediator.component_manager; - SDLContext & context = this->mediator.sdl_context; std::vector event_list = context.get_events(); - RefVector