1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Formatting cleanup

This commit is contained in:
Ivan Savenko 2023-01-01 22:50:38 +02:00
parent 6fd50a7ded
commit c479504646
3 changed files with 8 additions and 9 deletions

View File

@ -464,7 +464,6 @@ CSystemOptionsWindow::CSystemOptionsWindow()
rightGroup->add(282, 89, CGI->generaltexth->allTexts[573]); rightGroup->add(282, 89, CGI->generaltexth->allTexts[573]);
rightGroup->add(282, 121, CGI->generaltexth->allTexts[574]); rightGroup->add(282, 121, CGI->generaltexth->allTexts[574]);
rightGroup->add(282, 153, CGI->generaltexth->allTexts[577]); rightGroup->add(282, 153, CGI->generaltexth->allTexts[577]);
//rightGroup->add(282, 185, CGI->generaltexth->translate("vcmi.systemOptions.creatureWindowButton.hover"));
rightGroup->add(282, 217, CGI->generaltexth->translate("vcmi.systemOptions.fullscreenButton.hover")); rightGroup->add(282, 217, CGI->generaltexth->translate("vcmi.systemOptions.fullscreenButton.hover"));
//setting up buttons //setting up buttons
@ -1218,7 +1217,7 @@ CExchangeWindow::CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2,
garr->addSplitBtn(std::make_shared<CButton>( Point( 10, qeLayout ? 122 : 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), splitButtonCallback)); garr->addSplitBtn(std::make_shared<CButton>( Point( 10, qeLayout ? 122 : 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), splitButtonCallback));
garr->addSplitBtn(std::make_shared<CButton>( Point(744, qeLayout ? 122 : 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), splitButtonCallback)); garr->addSplitBtn(std::make_shared<CButton>( Point(744, qeLayout ? 122 : 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), splitButtonCallback));
if (qeLayout ) if(qeLayout)
{ {
moveAllGarrButtonLeft = std::make_shared<CButton>(Point(325, 118), QUICK_EXCHANGE_MOD_PREFIX + "/armRight.DEF", CButton::tooltip(CGI->generaltexth->qeModCommands[1]), controller.onMoveArmyToRight()); moveAllGarrButtonLeft = std::make_shared<CButton>(Point(325, 118), QUICK_EXCHANGE_MOD_PREFIX + "/armRight.DEF", CButton::tooltip(CGI->generaltexth->qeModCommands[1]), controller.onMoveArmyToRight());
echangeGarrButton = std::make_shared<CButton>(Point(377, 118), QUICK_EXCHANGE_MOD_PREFIX + "/swapAll.DEF", CButton::tooltip(CGI->generaltexth->qeModCommands[2]), controller.onSwapArmy()); echangeGarrButton = std::make_shared<CButton>(Point(377, 118), QUICK_EXCHANGE_MOD_PREFIX + "/swapAll.DEF", CButton::tooltip(CGI->generaltexth->qeModCommands[2]), controller.onSwapArmy());

View File

@ -321,7 +321,7 @@ const std::string & CGeneralTextHandler::serialize(const std::string & identifie
const std::string & CGeneralTextHandler::deserialize(const TextIdentifier & identifier) const const std::string & CGeneralTextHandler::deserialize(const TextIdentifier & identifier) const
{ {
if (stringsLocalizations.count(identifier.get())) if(stringsLocalizations.count(identifier.get()))
return stringsLocalizations.at(identifier.get()); return stringsLocalizations.at(identifier.get());
logGlobal->error("Unable to find localization for string '%s'", identifier.get()); logGlobal->error("Unable to find localization for string '%s'", identifier.get());
return identifier.get(); return identifier.get();
@ -403,7 +403,7 @@ CGeneralTextHandler::CGeneralTextHandler():
do do
{ {
std::string line = parser.readString(); std::string line = parser.readString();
if (!line.empty()) if(!line.empty())
{ {
registerString({"core.randtvrn", index}, line); registerString({"core.randtvrn", index}, line);
index += 1; index += 1;
@ -538,7 +538,7 @@ CGeneralTextHandler::CGeneralTextHandler():
} }
if (VLC->modh->modules.COMMANDERS) if (VLC->modh->modules.COMMANDERS)
{ {
if (CResourceHandler::get()->existsResource(ResourceID("DATA/ZNPC00.TXT", EResType::TEXT))) if(CResourceHandler::get()->existsResource(ResourceID("DATA/ZNPC00.TXT", EResType::TEXT)))
readToVector("vcmi.znpc00", "DATA/ZNPC00.TXT" ); readToVector("vcmi.znpc00", "DATA/ZNPC00.TXT" );
} }
} }
@ -576,7 +576,7 @@ size_t CGeneralTextHandler::getCampaignLength(size_t campaignID) const
{ {
assert(campaignID < scenariosCountPerCampaign.size()); assert(campaignID < scenariosCountPerCampaign.size());
if ( campaignID < scenariosCountPerCampaign.size()) if(campaignID < scenariosCountPerCampaign.size())
return scenariosCountPerCampaign[campaignID]; return scenariosCountPerCampaign[campaignID];
return 0; return 0;
} }
@ -587,7 +587,7 @@ std::vector<std::string> CGeneralTextHandler::findStringsWithPrefix(std::string
for (auto const & entry : stringsLocalizations) for (auto const & entry : stringsLocalizations)
{ {
if (boost::algorithm::starts_with(entry.first, prefix)) if(boost::algorithm::starts_with(entry.first, prefix))
result.push_back(entry.first); result.push_back(entry.first);
} }

View File

@ -78,7 +78,7 @@ const std::string & CQuest::missionName(CQuest::Emission mission)
"keymaster" "keymaster"
}; };
if (static_cast<size_t>(mission) < names.size()) if(static_cast<size_t>(mission) < names.size())
return names[static_cast<size_t>(mission)]; return names[static_cast<size_t>(mission)];
return names[0]; return names[0];
} }
@ -93,7 +93,7 @@ const std::string & CQuest::missionState(int state)
"description", "description",
}; };
if (state < states.size()) if(state < states.size())
return states[state]; return states[state];
return states[0]; return states[0];
} }