Added disableShadow method to ScalableFont, and
added black shadow/outline to text in the race gui. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8107 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
ca651b37b3
commit
d00f587d7a
@ -77,7 +77,7 @@ void ScalableFont::updateRTL()
|
|||||||
m_rtl = translations->isRTLLanguage();
|
m_rtl = translations->isRTLLanguage();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScalableFont::setShadow(irr::video::SColor col)
|
void ScalableFont::setShadow(const irr::video::SColor &col)
|
||||||
{
|
{
|
||||||
m_shadow = true;
|
m_shadow = true;
|
||||||
m_shadow_color = col;
|
m_shadow_color = col;
|
||||||
|
@ -121,7 +121,8 @@ public:
|
|||||||
/** Sets if digits are to be mono-spaced. */
|
/** Sets if digits are to be mono-spaced. */
|
||||||
void setMonospaceDigits(bool mono) {m_mono_space_digits = mono; }
|
void setMonospaceDigits(bool mono) {m_mono_space_digits = mono; }
|
||||||
bool getMonospaceDigits() const { return m_mono_space_digits; }
|
bool getMonospaceDigits() const { return m_mono_space_digits; }
|
||||||
void setShadow(irr::video::SColor col);
|
void setShadow(const irr::video::SColor &col);
|
||||||
|
void disableShadow() {m_shadow = false;}
|
||||||
|
|
||||||
//! gets the sprite bank
|
//! gets the sprite bank
|
||||||
virtual IGUISpriteBank* getSpriteBank() const;
|
virtual IGUISpriteBank* getSpriteBank() const;
|
||||||
|
@ -580,6 +580,9 @@ void MinimalRaceGUI::drawRankLap(const KartIconDisplayInfo* info,
|
|||||||
: GUIEngine::getFont());
|
: GUIEngine::getFont());
|
||||||
float scale = font->getScale();
|
float scale = font->getScale();
|
||||||
font->setScale(m_font_scale);
|
font->setScale(m_font_scale);
|
||||||
|
// Add a black shadow to make the text better readable on
|
||||||
|
// 'white' tracks (e.g. with snow and ice).
|
||||||
|
font->setShadow(video::SColor(255, 0, 0, 0));
|
||||||
static video::SColor color = video::SColor(255, 255, 255, 255);
|
static video::SColor color = video::SColor(255, 255, 255, 255);
|
||||||
WorldWithRank *world = (WorldWithRank*)(World::getWorld());
|
WorldWithRank *world = (WorldWithRank*)(World::getWorld());
|
||||||
|
|
||||||
@ -637,7 +640,7 @@ void MinimalRaceGUI::drawRankLap(const KartIconDisplayInfo* info,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
font->setScale(scale);
|
font->setScale(scale);
|
||||||
|
font->disableShadow();
|
||||||
} // drawRankLap
|
} // drawRankLap
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user