aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/crepe/api/Text.cpp6
-rw-r--r--src/crepe/api/Text.h2
-rw-r--r--src/crepe/facade/FontFacade.cpp2
-rw-r--r--src/crepe/facade/FontFacade.h2
-rw-r--r--src/example/loadfont.cpp5
5 files changed, 8 insertions, 9 deletions
diff --git a/src/crepe/api/Text.cpp b/src/crepe/api/Text.cpp
index e6db140..5b2befe 100644
--- a/src/crepe/api/Text.cpp
+++ b/src/crepe/api/Text.cpp
@@ -2,13 +2,11 @@
#include "Text.h"
-
using namespace crepe;
Text::Text(game_object_id_t id, const vec2 & dimensions, const vec2 & offset,
const std::string & text, const std::string & font_family, const Data & data)
: UIObject(id, dimensions, offset),
text(text),
- data(data),
- font(FontFacade::get_font_asset(font_family)) {
-}
+ data(data),
+ font(FontFacade::get_font_asset(font_family)) {}
diff --git a/src/crepe/api/Text.h b/src/crepe/api/Text.h
index 13b4375..fbb1ad6 100644
--- a/src/crepe/api/Text.h
+++ b/src/crepe/api/Text.h
@@ -4,8 +4,8 @@
#include "../Component.h"
-#include "Color.h"
#include "Asset.h"
+#include "Color.h"
#include "UIObject.h"
namespace crepe {
diff --git a/src/crepe/facade/FontFacade.cpp b/src/crepe/facade/FontFacade.cpp
index 12e10ed..708b2ff 100644
--- a/src/crepe/facade/FontFacade.cpp
+++ b/src/crepe/facade/FontFacade.cpp
@@ -1,6 +1,6 @@
-#include <stdexcept>
#include <SDL2/SDL_ttf.h>
#include <fontconfig/fontconfig.h>
+#include <stdexcept>
#include "FontFacade.h"
diff --git a/src/crepe/facade/FontFacade.h b/src/crepe/facade/FontFacade.h
index 1b835d4..0e6b7da 100644
--- a/src/crepe/facade/FontFacade.h
+++ b/src/crepe/facade/FontFacade.h
@@ -22,7 +22,7 @@ public:
* \param font_family Name of the font family name.
* \return Asset with filepath to the font.
*/
- static Asset get_font_asset(const std::string font_family);
+ static Asset get_font_asset(const std::string font_family);
};
} // namespace crepe
diff --git a/src/example/loadfont.cpp b/src/example/loadfont.cpp
index 0ea6d86..508197a 100644
--- a/src/example/loadfont.cpp
+++ b/src/example/loadfont.cpp
@@ -17,8 +17,9 @@ int main() {
1, vec2(100, 100), vec2(0, 0), "test test", "OpenSymbol", Text::Data{});
std::cout << "Path: " << label->font.get_path() << std::endl;
- std::unique_ptr<Text> label2 = std::make_unique<Text>(
- 1, vec2(100, 100), vec2(0, 0), "test test", "fsaafdafsdafsdafsdasfdds", Text::Data{});
+ std::unique_ptr<Text> label2
+ = std::make_unique<Text>(1, vec2(100, 100), vec2(0, 0), "test test",
+ "fsaafdafsdafsdafsdasfdds", Text::Data{});
std::cout << "Path: " << label2->font.get_path() << std::endl;
} catch (const std::exception & e) {
std::cout << "Standard exception thrown: " << e.what() << std::endl;