added lap icon to the the kart icons in RaceUI that have finished the race already (#3538)
* added lap icon to the the kart icons in RaceUI that have finished the race already * fixed identation * implemented Aurias feedback
This commit is contained in:
parent
6ae89331c0
commit
998d27dc5f
@ -191,7 +191,6 @@ RaceGUI::RaceGUI()
|
||||
//createMarkerTexture();
|
||||
|
||||
// Load icon textures for later reuse
|
||||
m_lap_flag = irr_driver->getTexture(FileManager::GUI_ICON, "lap_flag.png");
|
||||
m_red_team = irr_driver->getTexture(FileManager::GUI_ICON, "soccer_ball_red.png");
|
||||
m_blue_team = irr_driver->getTexture(FileManager::GUI_ICON, "soccer_ball_blue.png");
|
||||
m_red_flag = irr_driver->getTexture(FileManager::GUI_ICON, "red_flag.png");
|
||||
|
@ -93,7 +93,6 @@ private:
|
||||
|
||||
/** Icon textures (stored as variables to not look up
|
||||
their location on every frame) */
|
||||
irr::video::ITexture *m_lap_flag;
|
||||
irr::video::ITexture *m_red_team;
|
||||
irr::video::ITexture *m_blue_team;
|
||||
irr::video::ITexture *m_red_flag;
|
||||
|
@ -100,6 +100,7 @@ RaceGUIBase::RaceGUIBase()
|
||||
m_gauge_full_bright = irr_driver->getTexture(file_manager->getAsset(FileManager::GUI_ICON,"gauge_full_bright.png"));
|
||||
m_gauge_empty = irr_driver->getTexture(file_manager->getAsset(FileManager::GUI_ICON,"gauge_empty.png"));
|
||||
m_gauge_goal = irr_driver->getTexture(file_manager->getAsset(FileManager::GUI_ICON,"gauge_goal.png" ));
|
||||
m_lap_flag = irr_driver->getTexture(FileManager::GUI_ICON, "lap_flag.png");
|
||||
m_dist_show_overlap = 2;
|
||||
m_icons_inertia = 2;
|
||||
|
||||
@ -1048,6 +1049,18 @@ void RaceGUIBase::drawPlayerIcon(AbstractKart *kart, int x, int y, int w)
|
||||
NULL, true);
|
||||
}
|
||||
}
|
||||
|
||||
//lap flag for finished karts
|
||||
if (kart->hasFinishedRace())
|
||||
{
|
||||
if (m_lap_flag != NULL)
|
||||
{
|
||||
const core::rect<s32> rect(core::position2d<s32>(0, 0),
|
||||
m_lap_flag->getSize());
|
||||
const core::rect<s32> pos1(x - 20, y - 10, x + w - 20, y + w - 10);
|
||||
draw2DImage(m_lap_flag, pos1, rect, NULL, NULL, true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} // drawPlayerIcon
|
||||
|
||||
|
@ -187,6 +187,9 @@ protected:
|
||||
/** The frame around player karts in the mini map. */
|
||||
video::ITexture* m_icons_frame;
|
||||
|
||||
/** Texture for the lap icon*/
|
||||
video::ITexture* m_lap_flag;
|
||||
|
||||
RaceGUIMultitouch* m_multitouch_gui;
|
||||
|
||||
//void createMarkerTexture();
|
||||
|
Loading…
Reference in New Issue
Block a user