From 6d018610dc579b02bfbeeec218826f246e7bc6b8 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Wed, 27 May 2020 15:13:52 +0200 Subject: [PATCH] Fix the critmeter string being displayed wrongly --- src/crits.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crits.cpp b/src/crits.cpp index 9c5d02ed..2c538e45 100644 --- a/src/crits.cpp +++ b/src/crits.cpp @@ -707,16 +707,16 @@ void AddCritString(const std::string &string, const rgba_t &color) void DrawCritStrings() { - // Positions - float x = *bar_x + *size * 2.0f; + // Positions, base on crit meter itself and draw Centered + float x = *bar_x + *size * 2.0f / 2.0f; float y = *bar_y + *size / 5.0f; if (bar_string != "") { float sx, sy; - fonts::menu->stringSize(bar_string, &sx, &sy); + fonts::center_screen->stringSize(bar_string, &sx, &sy); // Center and draw below - draw::String((x - sx) / 2, (y + sy), colors::red, bar_string.c_str(), *fonts::center_screen); + draw::String(x - sx / 2, (y + sy), colors::red, bar_string.c_str(), *fonts::center_screen); y += fonts::center_screen->size + 1; }