1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

Altar artifacts widget refactoring

This commit is contained in:
SoundSSGood
2024-02-29 12:02:39 +02:00
parent 4839891de4
commit ae8d70748b
19 changed files with 216 additions and 238 deletions

View File

@ -24,9 +24,8 @@
#include "../../../lib/CGeneralTextHandler.h"
CTransferResources::CTransferResources(const IMarket * market, const CGHeroInstance * hero)
: CTradeBase(market, hero)
: CTradeBase(market, hero, [this](){return CTransferResources::getSelectionParams();})
, CResourcesSelling([this](const std::shared_ptr<CTradeableItem> & heroSlot){CTransferResources::onSlotClickPressed(heroSlot, hLeft);})
, CMarketMisc([this](){return CTransferResources::getSelectionParams();})
{
OBJECT_CONSTRUCTION_CAPTURING(255 - DISPOSE);
@ -65,7 +64,7 @@ void CTransferResources::makeDeal()
}
}
CMarketMisc::SelectionParams CTransferResources::getSelectionParams()
CTradeBase::SelectionParams CTransferResources::getSelectionParams() const
{
if(hLeft && hRight)
return std::make_tuple(