fixed a FIXME (minor change)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5107 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
2a06f7b2c0
commit
1be79f8a72
@ -415,11 +415,11 @@ RaceGUI::KartIconDisplayInfo* LinearWorld::getKartsDisplayInfo()
|
||||
- time_of_leader;
|
||||
str = "+" + StringUtils::timeToString(timeBehind);
|
||||
}
|
||||
rank_info.time = irr::core::stringw(str.c_str());
|
||||
rank_info.m_text = irr::core::stringw(str.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
rank_info.time = "";
|
||||
rank_info.m_text = "";
|
||||
}
|
||||
|
||||
int numLaps = race_manager->getNumLaps();
|
||||
|
@ -238,7 +238,7 @@ RaceGUI::KartIconDisplayInfo* ThreeStrikesBattle::getKartsDisplayInfo()
|
||||
char lives[4];
|
||||
sprintf(lives, "%i", m_kart_info[i].m_lives);
|
||||
|
||||
rank_info.time = lives; // FIXME - rename 'time' to something more generic
|
||||
rank_info.m_text = lives;
|
||||
}
|
||||
|
||||
return m_kart_display_info;
|
||||
|
@ -363,13 +363,13 @@ void RaceGUI::drawGlobalPlayerIcons(const KartIconDisplayInfo* info)
|
||||
|
||||
y = y_base + ( (position == -1 ? i : position-1)*(ICON_PLAYER_WIDTH+2));
|
||||
|
||||
if (info[i].time.size() > 0)
|
||||
if (info[i].m_text.size() > 0)
|
||||
{
|
||||
video::SColor color = video::SColor(255, (int)(255*info[i].r),
|
||||
(int)(255*info[i].g),
|
||||
(int)(255*info[i].b) );
|
||||
core::rect<s32> pos(x+ICON_PLAYER_WIDTH, y+5, x+ICON_PLAYER_WIDTH, y+5);
|
||||
core::stringw s=info[i].time.c_str();
|
||||
core::stringw s=info[i].m_text.c_str();
|
||||
font->draw(s.c_str(), pos, color);
|
||||
}
|
||||
|
||||
|
@ -39,16 +39,21 @@ class RaceGUI
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Used to display the list of karts and their times or
|
||||
* whatever other info is relevant to the current mode.
|
||||
*/
|
||||
* Used to display the list of karts and their times or
|
||||
* whatever other info is relevant to the current mode.
|
||||
*/
|
||||
struct KartIconDisplayInfo
|
||||
{
|
||||
irr::core::stringw time;
|
||||
/** text to display next to icon, if any */
|
||||
irr::core::stringw m_text;
|
||||
|
||||
/** text color, if any text */
|
||||
float r, g, b;
|
||||
|
||||
/** if this kart has a special title, e.g. "leader" in follow-the-leader */
|
||||
irr::core::stringw special_title;
|
||||
/** Current lap of this kart, or -1 if irrelevant
|
||||
*/
|
||||
|
||||
/** Current lap of this kart, or -1 if irrelevant */
|
||||
int lap;
|
||||
}; // KartIconDisplayInfo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user