Use an absolute path for the addons icon in the kart selection screen (no [?] anymore)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6029 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
xapantu 2010-09-16 17:11:18 +00:00
parent bbc82a1399
commit 81d87f02e2

View File

@ -1540,6 +1540,23 @@ void KartSelectionScreen::setKartsFromCurrentGroup()
{
unlock_manager->playLockSound();
}
#ifdef ADDONS_MANAGER
else if (selected_kart_group == "addons")
{
std::vector<int> group = kart_properties_manager->getKartsInGroup(selected_kart_group);
const int kart_amount = group.size();
for (int n=0; n<kart_amount; n++)
{
const KartProperties* prop = kart_properties_manager->getKartById(group[n]);
std::string icon_path = file_manager->getAddonsDir() + "/data/karts/" + prop->getIdent() + "/" + prop->getIconFile();
std::cout << icon_path << std::endl;
w->addItem(prop->getName().c_str(), prop->getIdent().c_str(), icon_path.c_str(), 0, IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE);
usableKartCount++;
}
}
#endif
else if (selected_kart_group != RibbonWidget::NO_ITEM_ID)
{
std::vector<int> group = kart_properties_manager->getKartsInGroup(selected_kart_group);