aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/Button.cpp6
-rw-r--r--src/crepe/api/Button.h2
-rw-r--r--src/crepe/api/Event.h2
-rw-r--r--src/crepe/api/UiObject.cpp5
-rw-r--r--src/crepe/api/UiObject.h3
5 files changed, 8 insertions, 10 deletions
diff --git a/src/crepe/api/Button.cpp b/src/crepe/api/Button.cpp
index f179f60..b104329 100644
--- a/src/crepe/api/Button.cpp
+++ b/src/crepe/api/Button.cpp
@@ -2,9 +2,9 @@
namespace crepe {
-Button::Button(game_object_id_t id, vec2 dimensions,vec2 offset, std::function<void()> on_click,
- bool is_toggle)
- : UIObject(id, dimensions,offset),
+Button::Button(game_object_id_t id, vec2 dimensions, vec2 offset,
+ std::function<void()> on_click, bool is_toggle)
+ : UIObject(id, dimensions, offset),
is_toggle(is_toggle),
on_click(on_click) {}
diff --git a/src/crepe/api/Button.h b/src/crepe/api/Button.h
index 043cc78..5c803ba 100644
--- a/src/crepe/api/Button.h
+++ b/src/crepe/api/Button.h
@@ -21,7 +21,7 @@ public:
* \param is_toggle Optional flag to indicate if the button is a toggle button. Defaults to false.
* \param on_click callback function that will be invoked when the button is clicked.
*/
- Button(game_object_id_t id, vec2 dimensions,vec2 offset, std::function<void()> on_click,
+ Button(game_object_id_t id, vec2 dimensions, vec2 offset, std::function<void()> on_click,
bool is_toggle = false);
/**
diff --git a/src/crepe/api/Event.h b/src/crepe/api/Event.h
index 8083d7c..6298118 100644
--- a/src/crepe/api/Event.h
+++ b/src/crepe/api/Event.h
@@ -94,8 +94,6 @@ public:
// Movement since last event in y
int delta_y = 0;
-
-
};
/**
diff --git a/src/crepe/api/UiObject.cpp b/src/crepe/api/UiObject.cpp
index 0262d31..2b287b3 100644
--- a/src/crepe/api/UiObject.cpp
+++ b/src/crepe/api/UiObject.cpp
@@ -2,6 +2,7 @@
using namespace crepe;
-UIObject::UIObject(game_object_id_t id, vec2 dimensions,vec2 offset)
+UIObject::UIObject(game_object_id_t id, vec2 dimensions, vec2 offset)
: Component(id),
- dimensions(dimensions),offset(offset){}
+ dimensions(dimensions),
+ offset(offset) {}
diff --git a/src/crepe/api/UiObject.h b/src/crepe/api/UiObject.h
index 1130f99..0634f97 100644
--- a/src/crepe/api/UiObject.h
+++ b/src/crepe/api/UiObject.h
@@ -16,11 +16,10 @@ public:
* \param dimensions width and height of the UIObject
* \param offset Offset relative to the GameObject Transform
*/
- UIObject(game_object_id_t id, vec2 dimensions,vec2 offset);
+ UIObject(game_object_id_t id, vec2 dimensions, vec2 offset);
//! Width and height of the UIObject
vec2 dimensions;
vec2 offset;
-
};
} // namespace crepe