1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

dismiss hero with fix

This commit is contained in:
SoundSSGood 2024-04-28 19:01:14 +03:00
parent c74d728f5a
commit 7543e26d42

View File

@ -319,9 +319,12 @@ void CHeroWindow::update(const CGHeroInstance * hero, bool redrawNeeded)
void CHeroWindow::dismissCurrent()
{
CFunctionList<void()> ony = [=](){ close(); };
ony += [=](){ LOCPLINT->cb->dismissHero(curHero); };
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[22], ony, nullptr);
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[22], [this]()
{
arts->putBackPickedArtifact();
close();
LOCPLINT->cb->dismissHero(curHero);
}, nullptr);
}
void CHeroWindow::createBackpackWindow()