1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

small fixes

This commit is contained in:
Laserlicht
2024-05-01 15:30:35 +02:00
parent 89b750c749
commit 5b8b75da22
3 changed files with 4 additions and 3 deletions

View File

@@ -488,6 +488,8 @@ void FactionSelector::updateListItems()
auto getImageIndex = [](FactionID factionID, bool enabled){ return (*CGI->townh)[factionID]->town->clientInfo.icons[true][!enabled] + 2; };
towns[factionID] = std::make_shared<CAnimImage>(AnimationPath::builtin("ITPA"), getImageIndex(factionID, townsEnabled[factionID]), 0, x_offset + 48 * x, 32 * (y - line));
townsArea[factionID] = std::make_shared<LRClickableArea>(Rect(x_offset + 48 * x, 32 * (y - line), 48, 32), [this, getImageIndex, factionID](){
if(CSH->isGuest())
return;
townsEnabled[factionID] = !townsEnabled[factionID];
towns[factionID]->setFrame(getImageIndex(factionID, townsEnabled[factionID]));
redraw();