From d4363f36041db97b1f673766d2010408476645cc Mon Sep 17 00:00:00 2001 From: Alayan Date: Thu, 11 Oct 2018 04:18:34 +0200 Subject: [PATCH] Use black outlines and the special digit font for trophies/points numbers in the overworld UI --- src/states_screens/race_gui_overworld.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/states_screens/race_gui_overworld.cpp b/src/states_screens/race_gui_overworld.cpp index f00a93b1b..2a4fbc1e8 100644 --- a/src/states_screens/race_gui_overworld.cpp +++ b/src/states_screens/race_gui_overworld.cpp @@ -274,7 +274,7 @@ void RaceGUIOverworld::drawTrophyPoints() core::rect pos(irr_driver->getActualScreenSize().Width - dist_from_right, 10, irr_driver->getActualScreenSize().Width , 50); - gui::ScalableFont* font = GUIEngine::getFont(); + gui::ScalableFont* font = GUIEngine::getHighresDigitFont(); bool vcenter = true; @@ -283,8 +283,6 @@ void RaceGUIOverworld::drawTrophyPoints() size*2, pos.UpperLeftCorner.Y + size); core::rect source(core::position2di(0, 0), m_trophy[3]->getSize()); - font->setShadow(video::SColor(255,0,0,0)); - // Draw trophies icon and the number of trophy obtained by type for (unsigned int i=0;i<4;i++) { @@ -302,7 +300,9 @@ void RaceGUIOverworld::drawTrophyPoints() (i==2) ? StringUtils::toString(player->getNumHardTrophies()) : StringUtils::toString(player->getNumBestTrophies()); core::stringw trophiesW(trophies.c_str()); + font->setBlackBorder(true); font->draw(trophiesW.c_str(), dest, time_color, false, vcenter, NULL, true /* ignore RTL */); + font->setBlackBorder(false); dest += core::position2di(size*2, 0); } @@ -329,7 +329,9 @@ void RaceGUIOverworld::drawTrophyPoints() pos.LowerRightCorner.Y = int(dest.LowerRightCorner.Y + 1.5f*size); pos.UpperLeftCorner.X -= int(0.5f*size + number_width*0.5f); + font->setBlackBorder(true); font->draw(sw.c_str(), pos, time_color, false, vcenter, NULL, true /* ignore RTL */); + font->setBlackBorder(false); pos.UpperLeftCorner.X += int(0.5f*size + number_width*0.5f); @@ -349,10 +351,10 @@ void RaceGUIOverworld::drawTrophyPoints() pos.UpperLeftCorner.X -= int(2*size + number_width*0.5f); + font->setBlackBorder(true); font->draw(swg.c_str(), pos, time_color, false, vcenter, NULL, true /* ignore RTL */); + font->setBlackBorder(false); } - - font->disableShadow(); #endif } // drawTrophyPoints