aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/Text.cpp7
-rw-r--r--src/crepe/api/Text.h8
2 files changed, 10 insertions, 5 deletions
diff --git a/src/crepe/api/Text.cpp b/src/crepe/api/Text.cpp
index 12d01f1..b30ccf6 100644
--- a/src/crepe/api/Text.cpp
+++ b/src/crepe/api/Text.cpp
@@ -2,5 +2,8 @@
using namespace crepe;
-Text::Text(game_object_id_t id,const vec2 & dimensions, const vec2 & offset,std::string text,std::string font_family) : UIObject(id,dimensions,offset),text(text), font_family(font_family){}
-
+Text::Text(game_object_id_t id, const vec2 & dimensions, const vec2 & offset, std::string text,
+ std::string font_family)
+ : UIObject(id, dimensions, offset),
+ text(text),
+ font_family(font_family) {}
diff --git a/src/crepe/api/Text.h b/src/crepe/api/Text.h
index 8436611..ebf413b 100644
--- a/src/crepe/api/Text.h
+++ b/src/crepe/api/Text.h
@@ -8,16 +8,17 @@
#include "Color.h"
#include "UIObject.h"
-namespace crepe{
+namespace crepe {
/**
* \brief Text UIObject component for displaying text
*
* This class can be used to display text on screen. By setting the font_family to a font already stored on the current device it will automatically be loaded in.
*/
-class Text : public UIObject{
+class Text : public UIObject {
public:
- Text(game_object_id_t id,const vec2 & dimensions, const vec2 & offset,std::string text,std::string font_family);
+ Text(game_object_id_t id, const vec2 & dimensions, const vec2 & offset, std::string text,
+ std::string font_family);
//! Text data that does not have to be set in the constructor
struct Data {
/**
@@ -40,6 +41,7 @@ public:
//! Label text color.
Color text_color = Color::BLACK;
};
+
public:
//! font family name such as (Arial,Helvetica,Inter)
std::string font_family = "";