mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-09 13:14:02 +02:00
new layout
This commit is contained in:
parent
fa9d5e9971
commit
25f7bb40d0
@ -1476,8 +1476,8 @@ CBuildWindow::CBuildWindow(const CGTownInstance *Town, const CBuilding * Buildin
|
|||||||
{
|
{
|
||||||
std::string text = std::to_string(building->resources[i]);
|
std::string text = std::to_string(building->resources[i]);
|
||||||
int resAfterBuy = LOCPLINT->cb->getResourceAmount(GameResID(i)) - building->resources[i];
|
int resAfterBuy = LOCPLINT->cb->getResourceAmount(GameResID(i)) - building->resources[i];
|
||||||
if(resAfterBuy < 0 && settings["general"]["enableUiEnhancements"].Bool())
|
if(resAfterBuy < 0 && state != EBuildingState::ALREADY_PRESENT && settings["general"]["enableUiEnhancements"].Bool())
|
||||||
text += " {H3Red|(" + std::to_string(-resAfterBuy) + ")}";
|
text = "{H3Orange|" + std::to_string(LOCPLINT->cb->getResourceAmount(GameResID(i))) + "}" + " / " + text;
|
||||||
components.push_back(std::make_shared<CComponent>(CComponent::resource, i, text, CComponent::small));
|
components.push_back(std::make_shared<CComponent>(CComponent::resource, i, text, CComponent::small));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user