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/windowing/StarFuelWidget.cpp | |
parent | d5f5fb5ddf0d4a9f0b0e6ac012121926d2fcd949 (diff) |
Lua chat callbacks + better font styling
golly gee whiz!! i hope i didn't fuck something up
Diffstat (limited to 'source/windowing/StarFuelWidget.cpp')
-rw-r--r-- | source/windowing/StarFuelWidget.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/windowing/StarFuelWidget.cpp b/source/windowing/StarFuelWidget.cpp index d7028f8..8f2d93d 100644 --- a/source/windowing/StarFuelWidget.cpp +++ b/source/windowing/StarFuelWidget.cpp @@ -9,8 +9,8 @@ namespace Star { FuelWidget::FuelWidget() { auto assets = Root::singleton().assets(); - m_fontSize = assets->json("/interface.config:font.buttonSize").toInt(); - m_font = assets->json("/interface.config:font.defaultFont").toString(); + m_textStyle.fontSize = assets->json("/interface.config:font.buttonSize").toInt(); + m_textStyle.loadJson(assets->json("/interface.config:textStyle")); m_fuelLevel = 0; m_maxLevel = 0; @@ -72,8 +72,7 @@ void FuelWidget::renderImpl() { context()->drawInterfaceQuad("/interface/fuel/fuelgaugemarkings.png", shift(0, 1, entireTex), shift(0, 1, entirePosition)); auto& guiContext = GuiContext::singleton(); - guiContext.setFontSize(m_fontSize); - guiContext.setFont(m_font); + guiContext.setTextStyle(m_textStyle); if (m_potential != 0) { guiContext.setFontColor(Color::White.toRgba()); } else if (m_fuelLevel == 0) { |