Fix text display with RTL
This commit is contained in:
parent
ec97bc8316
commit
84fa4ecac8
@ -885,10 +885,13 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin)
|
|||||||
|
|
||||||
if (info.m_text.size() > 0)
|
if (info.m_text.size() > 0)
|
||||||
{
|
{
|
||||||
core::rect<s32> pos(x+ICON_PLAYER_WIDTH, y+5,
|
core::dimension2du dim = font->getDimension(info.m_text.c_str());
|
||||||
x+ICON_PLAYER_WIDTH, y+5);
|
|
||||||
|
core::rect<s32> pos(x + ICON_PLAYER_WIDTH, y + 5,
|
||||||
|
x + ICON_PLAYER_WIDTH + dim.Width, y + 5 + dim.Height);
|
||||||
if (info.m_outlined_font)
|
if (info.m_outlined_font)
|
||||||
{
|
{
|
||||||
|
|
||||||
GUIEngine::getOutlineFont()->draw(info.m_text, pos,
|
GUIEngine::getOutlineFont()->draw(info.m_text, pos,
|
||||||
info.m_color, false, false, NULL, true/*ignore RTL*/);
|
info.m_color, false, false, NULL, true/*ignore RTL*/);
|
||||||
}
|
}
|
||||||
@ -905,8 +908,10 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin)
|
|||||||
|
|
||||||
if (info.special_title.size() > 0)
|
if (info.special_title.size() > 0)
|
||||||
{
|
{
|
||||||
core::rect<s32> pos(x+ICON_PLAYER_WIDTH, y+5,
|
core::dimension2du dim = font->getDimension(info.special_title.c_str());
|
||||||
x+ICON_PLAYER_WIDTH, y+5);
|
|
||||||
|
core::rect<s32> pos(x + ICON_PLAYER_WIDTH, y + 5,
|
||||||
|
x + ICON_PLAYER_WIDTH + dim.Width, y + 5 + dim.Height);
|
||||||
core::stringw s(info.special_title.c_str());
|
core::stringw s(info.special_title.c_str());
|
||||||
font->setBlackBorder(true);
|
font->setBlackBorder(true);
|
||||||
font->setThinBorder(true);
|
font->setThinBorder(true);
|
||||||
|
@ -1183,7 +1183,7 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
// -------------
|
// -------------
|
||||||
|
|
||||||
core::recti pos_name(current_x, y,
|
core::recti pos_name(current_x, y,
|
||||||
UserConfigParams::m_width, y + m_distance_between_rows);
|
current_x + m_width_kart_name, y + m_distance_between_rows);
|
||||||
m_font->draw(ri->m_kart_name, pos_name, color, false, false, NULL,
|
m_font->draw(ri->m_kart_name, pos_name, color, false, false, NULL,
|
||||||
true /* ignoreRTL */);
|
true /* ignoreRTL */);
|
||||||
current_x += m_width_kart_name + m_width_column_space;
|
current_x += m_width_kart_name + m_width_column_space;
|
||||||
|
Loading…
Reference in New Issue
Block a user