1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Artifacts altar ctrl+click

This commit is contained in:
SoundSSGood
2024-05-08 14:16:16 +03:00
parent 09bb9895ce
commit 0501073d4c
16 changed files with 126 additions and 142 deletions

View File

@@ -62,24 +62,27 @@ CMarketWindow::CMarketWindow(const IMarket * market, const CGHeroInstance * hero
void CMarketWindow::updateArtifacts()
{
assert(marketWidget);
marketWidget->update();
update();
}
void CMarketWindow::updateGarrisons()
{
assert(marketWidget);
marketWidget->update();
update();
}
void CMarketWindow::updateResource()
{
assert(marketWidget);
marketWidget->update();
update();
}
void CMarketWindow::updateHero()
{
update();
}
void CMarketWindow::update()
{
CWindowWithArtifacts::update();
assert(marketWidget);
marketWidget->update();
}
@@ -98,19 +101,6 @@ bool CMarketWindow::holdsGarrison(const CArmedInstance * army)
return marketWidget->hero == army;
}
void CMarketWindow::artifactRemoved(const ArtifactLocation & artLoc)
{
marketWidget->update();
CWindowWithArtifacts::artifactRemoved(artLoc);
}
void CMarketWindow::artifactMoved(const ArtifactLocation & srcLoc, const ArtifactLocation & destLoc, bool withRedraw)
{
CWindowWithArtifacts::artifactMoved(srcLoc, destLoc, withRedraw);
assert(marketWidget);
marketWidget->update();
}
void CMarketWindow::createChangeModeButtons(EMarketMode currentMode, const IMarket * market, const CGHeroInstance * hero)
{
auto isButtonVisible = [currentMode, market, hero](EMarketMode modeButton) -> bool