1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

Garrison: Disable split buttons when visiting ally

This commit is contained in:
Sandy Carter 2015-08-24 15:20:24 -04:00
parent 742f244426
commit c02700853a

View File

@ -272,7 +272,7 @@ void CGarrisonSlot::clickLeft(tribool down, bool previousState)
if(creature) if(creature)
{ {
for(auto & elem : owner->splitButtons) for(auto & elem : owner->splitButtons)
elem->block(false); elem->block(!our());
} }
} }
redraw(); redraw();
@ -455,7 +455,7 @@ void CGarrisonInt::selectSlot(CGarrisonSlot *slot)
highlighted = slot; highlighted = slot;
for (auto button : splitButtons) for (auto button : splitButtons)
button->block(highlighted == nullptr); button->block(highlighted == nullptr || !slot->our());
if (highlighted) if (highlighted)
highlighted->setHighlight(true); highlighted->setHighlight(true);