mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-25 21:38:59 +02:00
Garrison: Disable split buttons when visiting ally
This commit is contained in:
parent
742f244426
commit
c02700853a
@ -272,7 +272,7 @@ void CGarrisonSlot::clickLeft(tribool down, bool previousState)
|
||||
if(creature)
|
||||
{
|
||||
for(auto & elem : owner->splitButtons)
|
||||
elem->block(false);
|
||||
elem->block(!our());
|
||||
}
|
||||
}
|
||||
redraw();
|
||||
@ -455,7 +455,7 @@ void CGarrisonInt::selectSlot(CGarrisonSlot *slot)
|
||||
|
||||
highlighted = slot;
|
||||
for (auto button : splitButtons)
|
||||
button->block(highlighted == nullptr);
|
||||
button->block(highlighted == nullptr || !slot->our());
|
||||
|
||||
if (highlighted)
|
||||
highlighted->setHighlight(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user