Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarMainInterface.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-04-23 14:11:26 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-04-23 14:11:26 +1000
commit6ac139321b2a03d71192f852ff958cf6176e1c2d (patch)
treeffaa9f6c2e92caac834fdc6ff522914f74dac3e9 /source/frontend/StarMainInterface.cpp
parentdd677772382c3f63a5f2d331c6227e135e01db3c (diff)
oops - fix broken damage bar after text styling change
Diffstat (limited to 'source/frontend/StarMainInterface.cpp')
-rw-r--r--source/frontend/StarMainInterface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/frontend/StarMainInterface.cpp b/source/frontend/StarMainInterface.cpp
index ece00a5..533aa58 100644
--- a/source/frontend/StarMainInterface.cpp
+++ b/source/frontend/StarMainInterface.cpp
@@ -1170,9 +1170,10 @@ void MainInterface::renderSpecialDamageBar() {
m_guiContext->drawQuad(fill, RectF::withSize(bottomCenter + fillOffset, size * interfaceScale()));
auto nameOffset = jsonToVec2F(barConfig.get("nameOffset")) * interfaceScale();
- m_guiContext->setFontColor(jsonToColor(barConfig.get("nameStyle")).toRgba());
+ m_guiContext->setFontColor(jsonToColor(barConfig.get("nameColor")).toRgba());
m_guiContext->setFontSize(barConfig.getUInt("nameSize"));
- m_guiContext->setFontProcessingDirectives(barConfig.getString("nameDirectives"));
+ if (auto style = barConfig.get("nameStyle"))
+ m_guiContext->setTextStyle(style);
m_guiContext->renderText(target->name(), TextPositioning(bottomCenter + nameOffset, HorizontalAnchor::HMidAnchor, VerticalAnchor::BottomAnchor));
m_guiContext->clearTextStyle();
}