Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions src/states_screens/race_result_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1508,17 +1508,22 @@ void RaceResultGUI::displayOneEntry(unsigned int x, unsigned int y,
// -------------------
if (ri->m_new_points > 0)
{
core::recti dest_rect = core::recti(current_x, y,
current_x + 100, y + 10);
core::stringw point_string = core::stringw("+")
+ core::stringw((int)ri->m_new_points);
// With mono-space digits space has the same width as each digit,
// so we can simply fill up the string with spaces to get the
// right aligned.
while (point_string.size() < 3)
point_string = core::stringw(" ") + point_string;
m_font->draw(point_string, dest_rect, color, false, false, NULL,
true /* ignoreRTL */);
int displayed_new_points = ri->m_new_overall_points - (int)(ri->m_current_displayed_points);

if (displayed_new_points > 0)
{
core::recti dest_rect = core::recti(current_x, y,
current_x + 100, y + 10);
core::stringw point_string = core::stringw("+")
+ core::stringw(displayed_new_points);
// With mono-space digits space has the same width as each digit,
// so we can simply fill up the string with spaces to get the
// right aligned.
while (point_string.size() < 3)
point_string = core::stringw(" ") + point_string;
m_font->draw(point_string, dest_rect, color, false, false, NULL,
true /* ignoreRTL */);
}
}
current_x += m_width_new_points + m_width_column_space;

Expand Down