diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-22 06:07:59 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-22 06:07:59 +1000 |
commit | ca1426eabc873f781eb0dd389d45634b7d183250 (patch) | |
tree | 15ea83658ca3824232f14fe4b32ec714e0aa05c6 /source/core/StarText.hpp | |
parent | d5f5fb5ddf0d4a9f0b0e6ac012121926d2fcd949 (diff) |
Lua chat callbacks + better font styling
golly gee whiz!! i hope i didn't fuck something up
Diffstat (limited to 'source/core/StarText.hpp')
-rw-r--r-- | source/core/StarText.hpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source/core/StarText.hpp b/source/core/StarText.hpp index 4f6a97a..ff6880c 100644 --- a/source/core/StarText.hpp +++ b/source/core/StarText.hpp @@ -2,9 +2,29 @@ #include "StarString.hpp" #include "StarStringView.hpp" +#include "StarVector.hpp" +#include "StarDirectives.hpp" +#include "StarJson.hpp" namespace Star { - + +unsigned const DefaultFontSize = 8; +float const DefaultLineSpacing = 1.3f; + +struct TextStyle { + float lineSpacing = DefaultLineSpacing; + Vec4B color = Vec4B::filled(255); + Vec4B shadow = Vec4B::filled(0); + unsigned fontSize = DefaultFontSize; + String font = ""; + Directives directives; + Directives backDirectives; + + TextStyle() = default; + TextStyle(Json const& config); + TextStyle& loadJson(Json const& config); +}; + namespace Text { unsigned char const StartEsc = '\x1b'; unsigned char const EndEsc = ';'; |