From a5f8b34f4701863901e89abe5b0b604fd9e553b2 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Sun, 22 Dec 2024 20:18:44 +0100 Subject: ui fixes for offset --- src/crepe/api/Text.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/crepe/api/Text.cpp') diff --git a/src/crepe/api/Text.cpp b/src/crepe/api/Text.cpp index b24f0ac..29e36f1 100644 --- a/src/crepe/api/Text.cpp +++ b/src/crepe/api/Text.cpp @@ -1,10 +1,11 @@ #include "Text.h" +#include "types.h" using namespace crepe; Text::Text( - game_object_id_t id, const vec2 & dimensions, const vec2 & offset, - const std::string & font_family, const Data & data, const std::string & text + game_object_id_t id, const vec2 & dimensions, const std::string & font_family, + const Data & data, const vec2 & offset, const std::string & text ) : UIObject(id, dimensions, offset), text(text), -- cgit v1.2.3 From b9051627db1741fe373c08ab43170c257625073f Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Tue, 24 Dec 2024 09:49:49 +0100 Subject: feedback --- src/crepe/api/Button.h | 8 +++++--- src/crepe/api/Text.cpp | 3 ++- src/crepe/api/Text.h | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src/crepe/api/Text.cpp') diff --git a/src/crepe/api/Button.h b/src/crepe/api/Button.h index d7dc747..e986c04 100644 --- a/src/crepe/api/Button.h +++ b/src/crepe/api/Button.h @@ -1,7 +1,8 @@ #pragma once +#include "../types.h" + #include "UIObject.h" -#include "types.h" namespace crepe { @@ -46,13 +47,14 @@ public: */ virtual int get_instances_max() const { return 1; } +public: + Data data; + private: //! friend relation hover variable friend class InputSystem; //! Indicates whether the mouse is currently hovering over the button bool hover = false; - - Data data; }; } // namespace crepe diff --git a/src/crepe/api/Text.cpp b/src/crepe/api/Text.cpp index 29e36f1..e5b623d 100644 --- a/src/crepe/api/Text.cpp +++ b/src/crepe/api/Text.cpp @@ -1,5 +1,6 @@ +#include "../types.h" + #include "Text.h" -#include "types.h" using namespace crepe; diff --git a/src/crepe/api/Text.h b/src/crepe/api/Text.h index 37d86b4..8b3d53e 100644 --- a/src/crepe/api/Text.h +++ b/src/crepe/api/Text.h @@ -3,10 +3,11 @@ #include #include +#include "../types.h" + #include "Asset.h" #include "Color.h" #include "UIObject.h" -#include "types.h" namespace crepe { /** -- cgit v1.2.3