QTfrontend/ui/page/pageeditteam.cpp
changeset 12685 ad1fd7ae479d
parent 12684 5f68b259305c
child 12686 d5e09024d722
equal deleted inserted replaced
12684:5f68b259305c 12685:ad1fd7ae479d
   310     list = dataMgr.entryList("Sounds/voices",
   310     list = dataMgr.entryList("Sounds/voices",
   311                              QDir::AllDirs | QDir::NoDotAndDotDot);
   311                              QDir::AllDirs | QDir::NoDotAndDotDot);
   312 
   312 
   313     CBVoicepack->addItems(list);
   313     CBVoicepack->addItems(list);
   314 
   314 
       
   315     QIcon dlcIcon;
       
   316     dlcIcon.addFile(":/res/dlcMarker.png", QSize(), QIcon::Normal, QIcon::On);
       
   317     QPixmap emptySpace = QPixmap(7, 15);
       
   318     emptySpace.fill(QColor(0, 0, 0, 0));
       
   319     QIcon notDlcIcon = QIcon(emptySpace);
   315 
   320 
   316     // forts
   321     // forts
   317     list = dataMgr.entryList("Forts", QDir::Files, QStringList("*L.png"));
   322     list = dataMgr.entryList("Forts", QDir::Files, QStringList("*L.png"));
   318     foreach (QString file, list)
   323     foreach (QString file, list)
   319     {
   324     {
   320         QString fortPath = PHYSFS_getRealDir(QString("Forts/%1").arg(file).toLocal8Bit().data());
   325         QString fortPath = PHYSFS_getRealDir(QString("Forts/%1").arg(file).toLocal8Bit().data());
   321 
   326 
   322         QString fort = file.replace(QRegExp("L\\.png$"), "");
   327         QString fort = file.replace(QRegExp("L\\.png$"), "");
   323         QString fortDisplay;
       
   324 
   328 
   325         bool isDLC = !fortPath.startsWith(datadir->absolutePath());
   329         bool isDLC = !fortPath.startsWith(datadir->absolutePath());
   326         if (isDLC)
   330         if (isDLC)
   327             fortDisplay = "*" + fort;
   331         {
       
   332             CBFort->addItem(dlcIcon, fort, fort);
       
   333         }
   328         else
   334         else
   329             fortDisplay = fort;
   335         {
   330 
   336             CBFort->addItem(notDlcIcon, fort, fort);
   331         CBFort->addItem(fortDisplay, fort);
   337         }
       
   338 
   332     }
   339     }
   333 
   340 
   334 
   341 
   335     // graves
   342     // graves
   336     list =
   343     list =