mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Formatting cleanup
This commit is contained in:
parent
6fd50a7ded
commit
c479504646
@ -464,7 +464,6 @@ CSystemOptionsWindow::CSystemOptionsWindow()
|
||||
rightGroup->add(282, 89, CGI->generaltexth->allTexts[573]);
|
||||
rightGroup->add(282, 121, CGI->generaltexth->allTexts[574]);
|
||||
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"));
|
||||
|
||||
//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(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());
|
||||
echangeGarrButton = std::make_shared<CButton>(Point(377, 118), QUICK_EXCHANGE_MOD_PREFIX + "/swapAll.DEF", CButton::tooltip(CGI->generaltexth->qeModCommands[2]), controller.onSwapArmy());
|
||||
|
@ -321,7 +321,7 @@ const std::string & CGeneralTextHandler::serialize(const std::string & identifie
|
||||
|
||||
const std::string & CGeneralTextHandler::deserialize(const TextIdentifier & identifier) const
|
||||
{
|
||||
if (stringsLocalizations.count(identifier.get()))
|
||||
if(stringsLocalizations.count(identifier.get()))
|
||||
return stringsLocalizations.at(identifier.get());
|
||||
logGlobal->error("Unable to find localization for string '%s'", identifier.get());
|
||||
return identifier.get();
|
||||
@ -403,7 +403,7 @@ CGeneralTextHandler::CGeneralTextHandler():
|
||||
do
|
||||
{
|
||||
std::string line = parser.readString();
|
||||
if (!line.empty())
|
||||
if(!line.empty())
|
||||
{
|
||||
registerString({"core.randtvrn", index}, line);
|
||||
index += 1;
|
||||
@ -538,7 +538,7 @@ CGeneralTextHandler::CGeneralTextHandler():
|
||||
}
|
||||
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" );
|
||||
}
|
||||
}
|
||||
@ -576,7 +576,7 @@ size_t CGeneralTextHandler::getCampaignLength(size_t campaignID) const
|
||||
{
|
||||
assert(campaignID < scenariosCountPerCampaign.size());
|
||||
|
||||
if ( campaignID < scenariosCountPerCampaign.size())
|
||||
if(campaignID < scenariosCountPerCampaign.size())
|
||||
return scenariosCountPerCampaign[campaignID];
|
||||
return 0;
|
||||
}
|
||||
@ -587,7 +587,7 @@ std::vector<std::string> CGeneralTextHandler::findStringsWithPrefix(std::string
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ const std::string & CQuest::missionName(CQuest::Emission mission)
|
||||
"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[0];
|
||||
}
|
||||
@ -93,7 +93,7 @@ const std::string & CQuest::missionState(int state)
|
||||
"description",
|
||||
};
|
||||
|
||||
if (state < states.size())
|
||||
if(state < states.size())
|
||||
return states[state];
|
||||
return states[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user