diff --git a/src/states_screens/race_gui_base.cpp b/src/states_screens/race_gui_base.cpp index 50caa0a2d..77bb1ad9a 100644 --- a/src/states_screens/race_gui_base.cpp +++ b/src/states_screens/race_gui_base.cpp @@ -1075,6 +1075,27 @@ void RaceGUIBase::drawPlayerIcon(AbstractKart *kart, int x, int y, int w, draw2DImage(icon, pos4, rect4, NULL, NULL, true); } + // Current item(s) and how many if > 1 + const Powerup* powerup = kart->getPowerup(); + if (powerup->getType() != PowerupManager::POWERUP_NOTHING && !kart->hasFinishedRace()) + { + int numberItems = kart->getPowerup()->getNum(); + video::ITexture *iconItem = powerup->getIcon()->getTexture(); + assert(iconItem); + + const core::rect rect(core::position2d(0,0), iconItem->getSize()); + const core::rect posItem(x + w/2, y + w/2, x + 5*w/4, y + 5*w/4); + draw2DImage(iconItem, posItem, rect, NULL, NULL, true); + + if (numberItems > 1) + { + gui::ScalableFont* font = GUIEngine::getHighresDigitFont(); + const core::rect posNumber(x + w, y + w/4, x + 7*w/4, y + w); + font->setScale(3.f*((float) w)/(4.f*(float)font->getDimension(L"X").Height)); + font->draw(StringUtils::toWString(numberItems), posNumber, video::SColor(255, 255, 255, 255)); + } + } + //Plunger if (kart->getBlockedByPlungerTicks()>0) {