From 1202a34a5928427abe16b4e35327749315636426 Mon Sep 17 00:00:00 2001 From: Alayan Date: Fri, 5 Oct 2018 19:47:44 +0200 Subject: [PATCH] Add black borders to most text in the race UI --- src/states_screens/race_gui.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/states_screens/race_gui.cpp b/src/states_screens/race_gui.cpp index e67e95c1c..b16934cda 100644 --- a/src/states_screens/race_gui.cpp +++ b/src/states_screens/race_gui.cpp @@ -371,7 +371,9 @@ void RaceGUI::drawScores() position.LowerRightCorner.X, position.LowerRightCorner.Y + string_height); + font->setBlackBorder(true); font->draw(score.c_str(),pos,color); + font->setBlackBorder(false); if (i == 1) { @@ -451,8 +453,10 @@ void RaceGUI::drawGlobalTimer() if (use_digit_font) font->setShadow(video::SColor(255, 128, 0, 0)); font->setScale(1.0f); + font->setBlackBorder(true); font->draw(sw.c_str(), pos, time_color, false, false, NULL, true /* ignore RTL */); + font->setBlackBorder(false); } // drawGlobalTimer @@ -515,9 +519,10 @@ void RaceGUI::drawLiveDifference() gui::ScalableFont* font = GUIEngine::getHighresDigitFont(); font->setShadow(video::SColor(255, 128, 0, 0)); font->setScale(1.0f); + font->setBlackBorder(true); font->draw(sw.c_str(), pos, time_color, false, false, NULL, true /* ignore RTL */); - + font->setBlackBorder(false); } // drawLiveDifference //----------------------------------------------------------------------------- @@ -804,7 +809,9 @@ void RaceGUI::drawRank(const AbstractKart *kart, pos.UpperLeftCorner = core::vector2di(int(offset.X + 0.64f*meter_width), int(offset.Y - 0.49f*meter_height)); + font->setBlackBorder(true); font->draw(oss.str().c_str(), pos, color, true, true); + font->setBlackBorder(false); font->setScale(1.0f); return; } @@ -874,7 +881,9 @@ void RaceGUI::drawRank(const AbstractKart *kart, pos.UpperLeftCorner = core::vector2di(int(offset.X + 0.64f*meter_width), int(offset.Y - 0.49f*meter_height)); + font->setBlackBorder(true); font->draw(oss.str().c_str(), pos, color, true, true); + font->setBlackBorder(false); font->setScale(1.0f); } // drawRank @@ -1164,6 +1173,7 @@ void RaceGUI::drawLap(const AbstractKart* kart, if (ctf) { gui::ScalableFont* font = GUIEngine::getHighresDigitFont(); + font->setBlackBorder(true); font->setScale(scaling.Y < 1.0f ? 0.5f: 1.0f); core::stringw text = StringUtils::toWString(ctf->getRedScore()); font->draw(text, pos, video::SColor(255, 255, 0, 0)); @@ -1176,6 +1186,7 @@ void RaceGUI::drawLap(const AbstractKart* kart, text = StringUtils::toWString(ctf->getBlueScore()); font->draw(text, pos, video::SColor(255, 0, 0, 255)); font->setScale(1.0f); + font->setBlackBorder(false); return; } @@ -1206,7 +1217,9 @@ void RaceGUI::drawLap(const AbstractKart* kart, out << lap + 1 << "/" << race_manager->getNumLaps(); gui::ScalableFont* font = GUIEngine::getHighresDigitFont(); + font->setBlackBorder(true); font->draw(out.str().c_str(), pos, color); + font->setBlackBorder(false); font->setScale(1.0f); #endif } // drawLap