hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/core/event.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-13 18:39:13 +0200
committerhachem <im@hachem.wtf>2025-08-13 18:39:13 +0200
commit23086a5d33acc66414f1169bf22abe78b3383f94 (patch)
treea895c3e3ab8074118a84aada97ea990b60fba556 /src/core/event.h
parent2d8f706efe6e0a02b3238c2f22e7cdce620e9807 (diff)
fix: more consistent formatting
Diffstat (limited to 'src/core/event.h')
-rw-r--r--src/core/event.h26
1 files changed, 18 insertions, 8 deletions
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<typename T, typename F>
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)
{