Fix #3642
This commit is contained in:
parent
5472248d95
commit
4b459b6988
@ -753,6 +753,7 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
// Determine text height
|
// Determine text height
|
||||||
r = m_font->getDimension(L"Y");
|
r = m_font->getDimension(L"Y");
|
||||||
m_distance_between_rows = (int)(1.5f*r.Height);
|
m_distance_between_rows = (int)(1.5f*r.Height);
|
||||||
|
m_distance_between_meta_rows = m_distance_between_rows;
|
||||||
|
|
||||||
// If there are too many karts, reduce size between rows
|
// If there are too many karts, reduce size between rows
|
||||||
if (m_distance_between_rows * num_karts > height)
|
if (m_distance_between_rows * num_karts > height)
|
||||||
@ -1581,7 +1582,7 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int current_x = x;
|
int current_x = x;
|
||||||
current_y = y + (int)((i + 1) * m_distance_between_rows);
|
current_y = y + (int)((i + 1) * m_distance_between_meta_rows);
|
||||||
|
|
||||||
const KartProperties* prop = kart_properties_manager->getKart(kart_name);
|
const KartProperties* prop = kart_properties_manager->getKart(kart_name);
|
||||||
if (prop != NULL)
|
if (prop != NULL)
|
||||||
@ -1629,7 +1630,7 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
if (race_manager->modeHasLaps())
|
if (race_manager->modeHasLaps())
|
||||||
{
|
{
|
||||||
core::stringw laps = _("Laps: %i", race_manager->getNumLaps());
|
core::stringw laps = _("Laps: %i", race_manager->getNumLaps());
|
||||||
current_y += int(m_distance_between_rows * 0.8f * 2);
|
current_y += int(m_distance_between_meta_rows * 0.8f * 2);
|
||||||
GUIEngine::getFont()->draw(laps, core::recti(x, current_y, 0, 0),
|
GUIEngine::getFont()->draw(laps, core::recti(x, current_y, 0, 0),
|
||||||
white_color, false, false, nullptr, true);
|
white_color, false, false, nullptr, true);
|
||||||
}
|
}
|
||||||
@ -1637,7 +1638,7 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
const core::stringw& difficulty_name =
|
const core::stringw& difficulty_name =
|
||||||
race_manager->getDifficultyName(race_manager->getDifficulty());
|
race_manager->getDifficultyName(race_manager->getDifficulty());
|
||||||
core::stringw difficulty_string = _("Difficulty: %s", difficulty_name);
|
core::stringw difficulty_string = _("Difficulty: %s", difficulty_name);
|
||||||
current_y += int(m_distance_between_rows * 0.8f);
|
current_y += int(m_distance_between_meta_rows * 0.8f);
|
||||||
GUIEngine::getFont()->draw(difficulty_string, core::recti(x, current_y, 0, 0),
|
GUIEngine::getFont()->draw(difficulty_string, core::recti(x, current_y, 0, 0),
|
||||||
white_color, false, false, nullptr, true);
|
white_color, false, false, nullptr, true);
|
||||||
// show fastest lap
|
// show fastest lap
|
||||||
@ -1650,7 +1651,7 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
{
|
{
|
||||||
core::stringw best_lap_string = _("Best lap time: %s",
|
core::stringw best_lap_string = _("Best lap time: %s",
|
||||||
StringUtils::timeToString(best_lap_time, time_precision).c_str());
|
StringUtils::timeToString(best_lap_time, time_precision).c_str());
|
||||||
current_y += int(m_distance_between_rows * 0.8f);
|
current_y += int(m_distance_between_meta_rows * 0.8f);
|
||||||
GUIEngine::getFont()->draw(best_lap_string,
|
GUIEngine::getFont()->draw(best_lap_string,
|
||||||
core::recti(x, current_y, 0, 0), white_color, false, false,
|
core::recti(x, current_y, 0, 0), white_color, false, false,
|
||||||
nullptr, true);
|
nullptr, true);
|
||||||
|
@ -127,6 +127,9 @@ private:
|
|||||||
/** Distance between each row of the race results */
|
/** Distance between each row of the race results */
|
||||||
unsigned int m_distance_between_rows;
|
unsigned int m_distance_between_rows;
|
||||||
|
|
||||||
|
/** Distance between each row of the highscore, race data, etc.*/
|
||||||
|
unsigned int m_distance_between_meta_rows;
|
||||||
|
|
||||||
/** The size of the kart icons. */
|
/** The size of the kart icons. */
|
||||||
unsigned int m_width_icon;
|
unsigned int m_width_icon;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user