aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/Button.h6
-rw-r--r--src/crepe/api/Text.h12
-rw-r--r--src/crepe/api/UIObject.h2
3 files changed, 5 insertions, 15 deletions
diff --git a/src/crepe/api/Button.h b/src/crepe/api/Button.h
index d42527e..25709a4 100644
--- a/src/crepe/api/Button.h
+++ b/src/crepe/api/Button.h
@@ -1,8 +1,5 @@
#pragma once
-#include <functional>
-
-#include "Event.h"
#include "UIObject.h"
namespace crepe {
@@ -43,6 +40,9 @@ private:
friend class InputSystem;
//! Indicates whether the mouse is currently hovering over the button
bool hover = false;
+
+ //! variable indicating if transform is relative to camera(false) or world(true)
+ bool world_space = false;
};
} // namespace crepe
diff --git a/src/crepe/api/Text.h b/src/crepe/api/Text.h
index fb5c7e5..9d8573f 100644
--- a/src/crepe/api/Text.h
+++ b/src/crepe/api/Text.h
@@ -17,16 +17,8 @@ class Text : public UIObject {
public:
//! Text data that does not have to be set in the constructor
struct Data {
- /**
- * \brief fontsize for text rendering
- *
- * \note this is not the actual font size that is loaded in.
- *
- * Since SDL_TTF requires the font size when loading in the font it is not possible to switch the font size.
- * The default font size that is loaded is set in the Config.
- * Instead this value is used to upscale the font texture which can cause blurring or distorted text when upscaling or downscaling too much.
- */
- unsigned int font_size = 16;
+ //! variable indicating if transform is relative to camera(false) or world(true)
+ bool world_space = false;
//! Label text color.
Color text_color = Color::BLACK;
diff --git a/src/crepe/api/UIObject.h b/src/crepe/api/UIObject.h
index f1318ab..f7f4fba 100644
--- a/src/crepe/api/UIObject.h
+++ b/src/crepe/api/UIObject.h
@@ -20,8 +20,6 @@ public:
vec2 dimensions;
//! Position offset relative to this GameObjects Transform
vec2 offset;
- //! variable indicating if transform is relative to camera(false) or world(true)
- bool world_space = false;
};
} // namespace crepe