fixed names showing in lobby menu to be properly formatted
This commit is contained in:
parent
54a28b6fb5
commit
075293de09
|
@ -1882,7 +1882,7 @@ void MenuStateConnectedGame::reloadFactions(bool keepExistingSelectedItem, strin
|
|||
for(int i= 0; i<results.size(); ++i){
|
||||
results[i]= formatString(results[i]);
|
||||
|
||||
translatedFactionNames.push_back(techTree->getTranslatedFactionName(techTreeFiles[listBoxTechTree.getSelectedItemIndex()],factionFiles[i]));
|
||||
translatedFactionNames.push_back(formatString(techTree->getTranslatedFactionName(techTreeFiles[listBoxTechTree.getSelectedItemIndex()],factionFiles[i])));
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"Tech [%s] has faction [%s]\n",techTreeFiles[listBoxTechTree.getSelectedItemIndex()].c_str(),results[i].c_str());
|
||||
}
|
||||
|
@ -3354,7 +3354,7 @@ bool MenuStateConnectedGame::loadFactions(const GameSettings *gameSettings, bool
|
|||
factionFiles = results;
|
||||
vector<string> translatedFactionNames;
|
||||
for(int i= 0; i < factionFiles.size(); ++i) {
|
||||
translatedFactionNames.push_back(techTree->getTranslatedFactionName(gameSettings->getTech(),factionFiles[i]));
|
||||
translatedFactionNames.push_back(formatString(techTree->getTranslatedFactionName(gameSettings->getTech(),factionFiles[i])));
|
||||
}
|
||||
|
||||
for(int i=0; i<GameConstants::maxPlayers; ++i){
|
||||
|
@ -3395,7 +3395,7 @@ bool MenuStateConnectedGame::loadFactions(const GameSettings *gameSettings, bool
|
|||
factionFiles= results;
|
||||
vector<string> translatedFactionNames;
|
||||
for(int i= 0; i < factionFiles.size(); ++i) {
|
||||
translatedFactionNames.push_back(techTree->getTranslatedFactionName(gameSettings->getTech(),factionFiles[i]));
|
||||
translatedFactionNames.push_back(formatString(techTree->getTranslatedFactionName(gameSettings->getTech(),factionFiles[i])));
|
||||
}
|
||||
|
||||
for(int i= 0; i<results.size(); ++i){
|
||||
|
@ -4037,7 +4037,7 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
|
|||
techsFormatted.at(i)= formatString(techsFormatted.at(i));
|
||||
|
||||
string txTech = techTree->getTranslatedName(techTreeFiles.at(i), true);
|
||||
translatedTechs.push_back(txTech);
|
||||
translatedTechs.push_back(formatString(txTech));
|
||||
}
|
||||
listBoxTechTree.setItems(techsFormatted,translatedTechs);
|
||||
}
|
||||
|
@ -4801,7 +4801,7 @@ int MenuStateConnectedGame::setupTechList(string scenario, bool forceLoad) {
|
|||
vector<string> translatedTechs;
|
||||
for(unsigned int i= 0; i < techTreeFiles.size(); i++) {
|
||||
string txTech = techTree->getTranslatedName(techTreeFiles.at(i), forceLoad);
|
||||
translatedTechs.push_back(txTech);
|
||||
translatedTechs.push_back(formatString(txTech));
|
||||
}
|
||||
|
||||
listBoxTechTree.setItems(results,translatedTechs);
|
||||
|
|
|
@ -4498,7 +4498,7 @@ int MenuStateCustomGame::setupTechList(string scenario, bool forceLoad) {
|
|||
initialTechSelection= i;
|
||||
}
|
||||
string txTech = techTree->getTranslatedName(techTreeFiles.at(i), forceLoad);
|
||||
translatedTechs.push_back(txTech);
|
||||
translatedTechs.push_back(formatString(txTech));
|
||||
}
|
||||
|
||||
|
||||
|
@ -4556,7 +4556,7 @@ void MenuStateCustomGame::reloadFactions(bool keepExistingSelectedItem, string s
|
|||
factionFiles= results;
|
||||
for(int i = 0; i < results.size(); ++i) {
|
||||
results[i]= formatString(results[i]);
|
||||
translatedFactionNames.push_back(techTree->getTranslatedFactionName(techTreeFiles[listBoxTechTree.getSelectedItemIndex()],factionFiles[i]));
|
||||
translatedFactionNames.push_back(formatString(techTree->getTranslatedFactionName(techTreeFiles[listBoxTechTree.getSelectedItemIndex()],factionFiles[i])));
|
||||
//printf("FACTIONS i = %d results [%s]\n",i,results[i].c_str());
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"Tech [%s] has faction [%s]\n",techTreeFiles[listBoxTechTree.getSelectedItemIndex()].c_str(),results[i].c_str());
|
||||
|
|
|
@ -116,7 +116,7 @@ void FactionType::load(const string &factionName, const TechTree *techTree, Chec
|
|||
}
|
||||
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,Lang::getInstance().get("LogScreenGameLoadingFactionType","",true).c_str(),formatString(name).c_str());
|
||||
snprintf(szBuf,8096,Lang::getInstance().get("LogScreenGameLoadingFactionType","",true).c_str(),formatString(this->getName()).c_str());
|
||||
Logger::getInstance().add(szBuf, true);
|
||||
|
||||
if(personalityType == fpt_Normal) {
|
||||
|
|
|
@ -267,7 +267,7 @@ void TechTree::load(const string &dir, set<string> &factions, Checksum* checksum
|
|||
Lang::getInstance().get("Faction").c_str(),
|
||||
i+1,
|
||||
(int)factions.size(),
|
||||
this->getTranslatedFactionName(name,factionName).c_str());
|
||||
formatString(this->getTranslatedFactionName(name,factionName)).c_str());
|
||||
Logger &logger= Logger::getInstance();
|
||||
logger.setState(szBuf);
|
||||
logger.setProgress((int)((((double)i) / (double)factions.size()) * 100.0));
|
||||
|
|
Loading…
Reference in New Issue