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

red is the most liked color

This commit is contained in:
Laserlicht 2023-10-10 23:15:40 +02:00 committed by GitHub
parent 25f7bb40d0
commit 8a3e58cd5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1477,7 +1477,7 @@ CBuildWindow::CBuildWindow(const CGTownInstance *Town, const CBuilding * Buildin
std::string text = std::to_string(building->resources[i]);
int resAfterBuy = LOCPLINT->cb->getResourceAmount(GameResID(i)) - building->resources[i];
if(resAfterBuy < 0 && state != EBuildingState::ALREADY_PRESENT && settings["general"]["enableUiEnhancements"].Bool())
text = "{H3Orange|" + std::to_string(LOCPLINT->cb->getResourceAmount(GameResID(i))) + "}" + " / " + text;
text = "{H3Red|" + std::to_string(LOCPLINT->cb->getResourceAmount(GameResID(i))) + "}" + " / " + text;
components.push_back(std::make_shared<CComponent>(CComponent::resource, i, text, CComponent::small));
}
}