mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Merge pull request #3852 from SoundSSGood/dismiss-hero-fix
Dismiss hero with picked artifact. Fixed.
This commit is contained in:
commit
c5d7fd543a
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user