diff --git a/data/CREDITS b/data/CREDITS index 41bedd88d..952ed5595 100644 Binary files a/data/CREDITS and b/data/CREDITS differ diff --git a/src/states_screens/race_gui.cpp b/src/states_screens/race_gui.cpp index 222c38f80..5d558d7cd 100644 --- a/src/states_screens/race_gui.cpp +++ b/src/states_screens/race_gui.cpp @@ -99,6 +99,10 @@ RaceGUI::RaceGUI() m_dist_show_overlap=2; m_icons_inertia=2; + + //read icon frame picture + m_icons_frame=material_manager->getMaterial("icons-frame.png"); + } // RaceGUI //----------------------------------------------------------------------------- @@ -509,7 +513,23 @@ void RaceGUI::drawGlobalPlayerIcons(const KartIconDisplayInfo* info) kart->getController()->isPlayerController() ? ICON_PLAYER_WIDTH : ICON_WIDTH; const core::rect pos(x, y, x+w, y+w); - + + //to bring to light the player's icon: add a background + if (kart->getController()->isPlayerController()) + { + video::SColor colors[4]; + for (unsigned int i=0;i<4;i++) + { + colors[i]=kart->getKartProperties()->getColor(); + colors[i].setAlpha( + 100+100*cos(M_PI/2*i+World::getWorld()->getTime()*2)); + } + const core::rect rect(core::position2d(0,0), + m_icons_frame->getTexture()->getOriginalSize()); + irr_driver->getVideoDriver()->draw2DImage( + m_icons_frame->getTexture(), pos, rect,NULL, colors, true); + } + // Fixes crash bug, why are certain icons not showing up? if ((icon != NULL) && (!kart->playingEmergencyAnimation())) { diff --git a/src/states_screens/race_gui.hpp b/src/states_screens/race_gui.hpp index 83c00297f..051ebb008 100644 --- a/src/states_screens/race_gui.hpp +++ b/src/states_screens/race_gui.hpp @@ -144,6 +144,7 @@ private: float m_icons_inertia;///can be zero /** previous position of icons */ std::vector< core::vector2d > m_previous_icons_position; + Material *m_icons_frame; void createMarkerTexture(); void createRegularPolygon(unsigned int n, float radius,