aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-18 13:26:04 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-18 13:26:04 +0100
commita444da0b35123a9e51cde1f5be9aab0204eb5b66 (patch)
treecb3c02bbd94b2750c57c4579de5f7f8def05f324 /src/crepe/facade/SDLContext.h
parentf71769f7d2e9530a49295d0c0c86c2f6add069d8 (diff)
parent81404db80bbf9463c3d535ae389e7fbb753a902c (diff)
merge master
Diffstat (limited to 'src/crepe/facade/SDLContext.h')
-rw-r--r--src/crepe/facade/SDLContext.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h
index b9c7fbd..b687f87 100644
--- a/src/crepe/facade/SDLContext.h
+++ b/src/crepe/facade/SDLContext.h
@@ -17,8 +17,10 @@
#include "api/KeyCodes.h"
#include "api/Sprite.h"
#include "api/Transform.h"
+#include "types.h"
#include "EventData.h"
+#include "FontFacade.h"
namespace crepe {
class Texture;
@@ -242,6 +244,20 @@ private:
CameraAuxiliaryData cam_aux_data;
private:
+ //! instance of the font_facade
+ FontFacade font_facade{};
+
+public:
+ /**
+ * \brief Function to Get asset from font_family
+ *
+ * This function uses the FontFacade function to convert a font_family to an asset.
+ *
+ * \param font_family name of the font style that needs to be used (will return an asset with default font path of the font_family doesnt exist)
+ *
+ * \return asset with the font style absolute path
+ */
+ Asset get_font_from_name(const std::string & font_family);
//! variable to store the state of each key (true = pressed, false = not pressed)
keyboard_state_t keyboard_state;
//! lookup table for converting SDL_SCANCODES to Keycodes