mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-31 22:05:10 +02:00
Correctly update hero list on reordering via radial menu
This commit is contained in:
parent
50536e28da
commit
a08546e964
@ -239,6 +239,8 @@ void PlayerLocalState::swapWanderingHero(int pos1, int pos2)
|
|||||||
{
|
{
|
||||||
assert(wanderingHeroes[pos1] && wanderingHeroes[pos2]);
|
assert(wanderingHeroes[pos1] && wanderingHeroes[pos2]);
|
||||||
std::swap(wanderingHeroes[pos1], wanderingHeroes[pos2]);
|
std::swap(wanderingHeroes[pos1], wanderingHeroes[pos2]);
|
||||||
|
|
||||||
|
adventureInt->onHeroOrderChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<const CGTownInstance *> & PlayerLocalState::getOwnedTowns()
|
const std::vector<const CGTownInstance *> & PlayerLocalState::getOwnedTowns()
|
||||||
|
@ -331,6 +331,11 @@ void AdventureMapInterface::onTownOrderChanged()
|
|||||||
widget->getTownList()->updateWidget();
|
widget->getTownList()->updateWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AdventureMapInterface::onHeroOrderChanged()
|
||||||
|
{
|
||||||
|
widget->getHeroList()->updateWidget();
|
||||||
|
}
|
||||||
|
|
||||||
void AdventureMapInterface::onMapTilesChanged(boost::optional<std::unordered_set<int3>> positions)
|
void AdventureMapInterface::onMapTilesChanged(boost::optional<std::unordered_set<int3>> positions)
|
||||||
{
|
{
|
||||||
if (positions)
|
if (positions)
|
||||||
|
@ -149,6 +149,9 @@ public:
|
|||||||
/// Called when town order changes
|
/// Called when town order changes
|
||||||
void onTownOrderChanged();
|
void onTownOrderChanged();
|
||||||
|
|
||||||
|
/// Called when hero order changes
|
||||||
|
void onHeroOrderChanged();
|
||||||
|
|
||||||
/// Called when map audio should be paused, e.g. on combat or town screen access
|
/// Called when map audio should be paused, e.g. on combat or town screen access
|
||||||
void onAudioPaused();
|
void onAudioPaused();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user