From 23086a5d33acc66414f1169bf22abe78b3383f94 Mon Sep 17 00:00:00 2001 From: hachem Date: Wed, 13 Aug 2025 18:39:13 +0200 Subject: fix: more consistent formatting --- src/core/event.h | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/core/event.h') diff --git a/src/core/event.h b/src/core/event.h index e4d1be1..a1e30e9 100644 --- a/src/core/event.h +++ b/src/core/event.h @@ -156,7 +156,8 @@ namespace Donut EventCategoryInput; } protected: - KeyEvent(int keycode) : m_key_code(keycode) { } + KeyEvent(int keycode) + : m_key_code(keycode) { } int m_key_code; }; @@ -185,7 +186,8 @@ namespace Donut : public KeyEvent { public: - KeyReleasedEvent(int keycode) : KeyEvent(keycode) { } + KeyReleasedEvent(int keycode) + : KeyEvent(keycode) { } std::string to_string() const override { @@ -199,7 +201,8 @@ namespace Donut : public KeyEvent { public: - KeyTypedEvent(int keycode) : KeyEvent(keycode) { } + KeyTypedEvent(int keycode) + : KeyEvent(keycode) { } std::string to_string() const override { @@ -262,7 +265,8 @@ namespace Donut EventCategoryInput; } protected: - MouseButtonEvent(int button) : m_button(button) { } + MouseButtonEvent(int button) + : m_button(button) { } int m_button; }; @@ -270,7 +274,8 @@ namespace Donut : public MouseButtonEvent { public: - MouseButtonPressedEvent(int button) : MouseButtonEvent(button) { } + MouseButtonPressedEvent(int button) + : MouseButtonEvent(button) { } std::string to_string() const override { @@ -284,7 +289,8 @@ namespace Donut : public MouseButtonEvent { public: - MouseButtonReleasedEvent(int button) : MouseButtonEvent(button) { } + MouseButtonReleasedEvent(int button) + : MouseButtonEvent(button) { } std::string to_string() const override { @@ -297,7 +303,8 @@ namespace Donut class EventDispatcher { public: - EventDispatcher(Event& event) : m_event(event) { } + EventDispatcher(Event& event) + : m_event(event) { } template bool dispatch(const F& func) @@ -322,7 +329,10 @@ namespace Donut EventHandler() = default; ~EventHandler() = default; - void set_event_callback(const EventCallbackFn& callback) { m_event_callback = callback; } + void set_event_callback(const EventCallbackFn& callback) + { + m_event_callback = callback; + } void on_event(Event& event) { -- cgit v1.3