1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

better UI

This commit is contained in:
Laserlicht
2024-09-28 02:34:18 +02:00
parent 3559f9f923
commit afb90c076d
6 changed files with 10 additions and 4 deletions

View File

@@ -2053,9 +2053,11 @@ void CMageGuildScreen::Scroll::clickPressed(const Point & cursorPosition)
cost[EGameResID::GEMS] = (level + 1) * 2;
std::vector<std::shared_ptr<CComponent>> resComps;
resComps.push_back(std::make_shared<CComponent>(ComponentType::SPELL_SCROLL, town->spells[level].at(town->spellsAtLevel(level, false))));
resComps.back()->newLine = true;
for(TResources::nziterator i(cost); i.valid(); i++)
{
resComps.push_back(std::make_shared<CComponent>(ComponentType::RESOURCE, i->resType, i->resVal));
resComps.push_back(std::make_shared<CComponent>(ComponentType::RESOURCE, i->resType, i->resVal, CComponent::ESize::medium));
}
if(LOCPLINT->cb->getResourceAmount().canAfford(cost))