mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
assembling art qol
This commit is contained in:
@@ -113,17 +113,22 @@ void CWindowWithArtifacts::swapArtifactAndClose(const CArtifactsOfHeroBase & art
|
||||
close();
|
||||
}
|
||||
|
||||
void CWindowWithArtifacts::showArtifactAssembling(const CArtifactsOfHeroBase & artsInst, CArtPlace & artPlace,
|
||||
void CWindowWithArtifacts::showArtifactPopup(const CArtifactsOfHeroBase & artsInst, CArtPlace & artPlace,
|
||||
const Point & cursorPosition) const
|
||||
{
|
||||
if(artsInst.getArt(artPlace.slot))
|
||||
{
|
||||
if(GAME->interface()->artifactController->askToDisassemble(artsInst.getHero(), artPlace.slot))
|
||||
return;
|
||||
if(GAME->interface()->artifactController->askToAssemble(artsInst.getHero(), artPlace.slot))
|
||||
return;
|
||||
if(artPlace.text.size())
|
||||
if(!artPlace.text.empty())
|
||||
{
|
||||
artPlace.LRClickableAreaWTextComp::showPopupWindow(cursorPosition);
|
||||
artPlace.setClosePopupWindowCallback([hero = artsInst.getHero(), artPlacePtr = &artPlace]()
|
||||
{
|
||||
GAME->interface()->artifactController->askToAssemble(hero, artPlacePtr->slot);
|
||||
artPlacePtr->setClosePopupWindowCallback([](){});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user