1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

suggested changes

This commit is contained in:
SoundSSGood
2024-01-10 18:01:34 +02:00
parent fdf60b2151
commit b840cf3650
10 changed files with 55 additions and 50 deletions

View File

@@ -29,7 +29,7 @@ public:
virtual void artifactAssembled(const ArtifactLocation & artLoc)=0; virtual void artifactAssembled(const ArtifactLocation & artLoc)=0;
}; };
class CArtPlace : public LRClickableAreaWTextComp, public SelectableSlot class CArtPlace : public SelectableSlot
{ {
public: public:
using ClickFunctor = std::function<void(CArtPlace&, const Point&)>; using ClickFunctor = std::function<void(CArtPlace&, const Point&)>;

View File

@@ -21,9 +21,9 @@ CArtifactsOfHeroMarket::CArtifactsOfHeroMarket(const Point & position)
std::bind(&CArtifactsOfHeroMarket::scrollBackpack, this, _1)); std::bind(&CArtifactsOfHeroMarket::scrollBackpack, this, _1));
for(const auto & [slot, artPlace] : artWorn) for(const auto & [slot, artPlace] : artWorn)
artPlace->selection->setBorderWidth(2); artPlace->setSelectionWidth(2);
for(auto artPlace : backpack) for(auto artPlace : backpack)
artPlace->selection->setBorderWidth(2); artPlace->setSelectionWidth(2);
}; };
void CArtifactsOfHeroMarket::scrollBackpack(int offset) void CArtifactsOfHeroMarket::scrollBackpack(int offset)

View File

@@ -705,9 +705,8 @@ void SimpleLine::showAll(Canvas & to)
} }
SelectableSlot::SelectableSlot(Rect area, Point oversize, const int width) SelectableSlot::SelectableSlot(Rect area, Point oversize, const int width)
: LRClickableAreaWTextComp(area)
{ {
pos += area.topLeft();
pos.w = area.w; pos.h = area.h;
selection = std::make_unique<TransparentFilledRectangle>( selection = std::make_unique<TransparentFilledRectangle>(
Rect(area.topLeft() - oversize, area.dimensions() + oversize * 2), Colors::TRANSPARENCY, Colors::YELLOW, width); Rect(area.topLeft() - oversize, area.dimensions() + oversize * 2), Colors::TRANSPARENCY, Colors::YELLOW, width);
selectSlot(false); selectSlot(false);
@@ -732,3 +731,8 @@ bool SelectableSlot::isSelected() const
{ {
return selection->getDrawBorder(); return selection->getDrawBorder();
} }
void SelectableSlot::setSelectionWidth(int width)
{
selection->setBorderWidth(width);
}

View File

@@ -273,14 +273,15 @@ public:
void showAll(Canvas & to) override; void showAll(Canvas & to) override;
}; };
class SelectableSlot : virtual public CIntObject class SelectableSlot : public LRClickableAreaWTextComp
{ {
public:
std::unique_ptr<TransparentFilledRectangle> selection; std::unique_ptr<TransparentFilledRectangle> selection;
public:
SelectableSlot(Rect area, Point oversize, const int width); SelectableSlot(Rect area, Point oversize, const int width);
SelectableSlot(Rect area, Point oversize); SelectableSlot(Rect area, Point oversize);
SelectableSlot(Rect area, const int width = 1); SelectableSlot(Rect area, const int width = 1);
void selectSlot(bool on); void selectSlot(bool on);
bool isSelected() const; bool isSelected() const;
void setSelectionWidth(int width);
}; };

View File

@@ -31,6 +31,8 @@ CAltarArtifacts::CAltarArtifacts(const IMarket * market, const CGHeroInstance *
{ {
OBJECT_CONSTRUCTION_CAPTURING(255 - DISPOSE); OBJECT_CONSTRUCTION_CAPTURING(255 - DISPOSE);
deal = std::make_shared<CButton>(dealButtonPos, AnimationPath::builtin("ALTSACR.DEF"),
CGI->generaltexth->zelp[585], [this]() {CAltarArtifacts::makeDeal(); });
labels.emplace_back(std::make_shared<CLabel>(450, 34, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[477])); labels.emplace_back(std::make_shared<CLabel>(450, 34, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[477]));
labels.emplace_back(std::make_shared<CLabel>(302, 423, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[478])); labels.emplace_back(std::make_shared<CLabel>(302, 423, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[478]));
selectedCost = std::make_shared<CLabel>(302, 500, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE); selectedCost = std::make_shared<CLabel>(302, 500, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
@@ -50,7 +52,7 @@ CAltarArtifacts::CAltarArtifacts(const IMarket * market, const CGHeroInstance *
int slotNum = 0; int slotNum = 0;
for(auto & altarSlotPos : posSlotsAltar) for(auto & altarSlotPos : posSlotsAltar)
{ {
auto altarSlot = std::make_shared<CTradeableItem>(altarSlotPos, EType::ARTIFACT_PLACEHOLDER, -1, false, slotNum); auto altarSlot = std::make_shared<CTradeableItem>(Rect(altarSlotPos, Point(44, 44)), EType::ARTIFACT_PLACEHOLDER, -1, false, slotNum);
altarSlot->clickPressedCallback = std::bind(&CAltarArtifacts::onSlotClickPressed, this, _1, hRight); altarSlot->clickPressedCallback = std::bind(&CAltarArtifacts::onSlotClickPressed, this, _1, hRight);
altarSlot->subtitle.clear(); altarSlot->subtitle.clear();
items.front().emplace_back(altarSlot); items.front().emplace_back(altarSlot);

View File

@@ -30,6 +30,8 @@ CAltarCreatures::CAltarCreatures(const IMarket * market, const CGHeroInstance *
{ {
OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(255 - DISPOSE); OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(255 - DISPOSE);
deal = std::make_shared<CButton>(dealButtonPos, AnimationPath::builtin("ALTSACR.DEF"),
CGI->generaltexth->zelp[584], [this]() {CAltarCreatures::makeDeal();});
labels.emplace_back(std::make_shared<CLabel>(155, 30, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, labels.emplace_back(std::make_shared<CLabel>(155, 30, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW,
boost::str(boost::format(CGI->generaltexth->allTexts[272]) % hero->getNameTranslated()))); boost::str(boost::format(CGI->generaltexth->allTexts[272]) % hero->getNameTranslated())));
labels.emplace_back(std::make_shared<CLabel>(450, 30, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[479])); labels.emplace_back(std::make_shared<CLabel>(450, 30, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[479]));

View File

@@ -25,8 +25,6 @@ CTradeBase::CTradeBase(const IMarket * market, const CGHeroInstance * hero)
: market(market) : market(market)
, hero(hero) , hero(hero)
{ {
deal = std::make_shared<CButton>(Point(), AnimationPath::builtin("ALTSACR.DEF"),
CGI->generaltexth->zelp[585], std::bind(&CTradeBase::makeDeal, this));
} }
void CTradeBase::removeItems(const std::set<std::shared_ptr<CTradeableItem>> & toRemove) void CTradeBase::removeItems(const std::set<std::shared_ptr<CTradeableItem>> & toRemove)
@@ -53,9 +51,9 @@ void CTradeBase::getEmptySlots(std::set<std::shared_ptr<CTradeableItem>> & toRem
void CTradeBase::deselect() void CTradeBase::deselect()
{ {
if(hLeft) if(hLeft)
hLeft->selection->selectSlot(false); hLeft->selectSlot(false);
if(hRight) if(hRight)
hRight->selection->selectSlot(false); hRight->selectSlot(false);
hLeft = hRight = nullptr; hLeft = hRight = nullptr;
deal->block(true); deal->block(true);
} }
@@ -66,9 +64,9 @@ void CTradeBase::onSlotClickPressed(const std::shared_ptr<CTradeableItem> & newS
return; return;
if(hCurSlot) if(hCurSlot)
hCurSlot->selection->selectSlot(false); hCurSlot->selectSlot(false);
hCurSlot = newSlot; hCurSlot = newSlot;
newSlot->selection->selectSlot(true); newSlot->selectSlot(true);
} }
CExperienceAltar::CExperienceAltar() CExperienceAltar::CExperienceAltar()
@@ -79,7 +77,6 @@ CExperienceAltar::CExperienceAltar()
texts.emplace_back(std::make_shared<CTextBox>(CGI->generaltexth->allTexts[475], Rect(15, 415, 125, 50), 0, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW)); texts.emplace_back(std::make_shared<CTextBox>(CGI->generaltexth->allTexts[475], Rect(15, 415, 125, 50), 0, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW));
// Total experience on the Altar // Total experience on the Altar
texts.emplace_back(std::make_shared<CTextBox>(CGI->generaltexth->allTexts[476], Rect(15, 495, 125, 40), 0, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW)); texts.emplace_back(std::make_shared<CTextBox>(CGI->generaltexth->allTexts[476], Rect(15, 495, 125, 40), 0, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW));
deal->moveBy(dealButtonPos);
expToLevel = std::make_shared<CLabel>(75, 477, FONT_SMALL, ETextAlignment::CENTER); expToLevel = std::make_shared<CLabel>(75, 477, FONT_SMALL, ETextAlignment::CENTER);
expForHero = std::make_shared<CLabel>(75, 545, FONT_SMALL, ETextAlignment::CENTER); expForHero = std::make_shared<CLabel>(75, 545, FONT_SMALL, ETextAlignment::CENTER);
} }

View File

@@ -10,8 +10,6 @@
#include "StdInc.h" #include "StdInc.h"
#include "TradePanels.h" #include "TradePanels.h"
#include "../MiscWidgets.h"
#include "../../gui/CGuiHandler.h" #include "../../gui/CGuiHandler.h"
#include "../../render/Canvas.h" #include "../../render/Canvas.h"
#include "../../widgets/TextControls.h" #include "../../widgets/TextControls.h"
@@ -25,9 +23,9 @@
#include "../../../lib/CGeneralTextHandler.h" #include "../../../lib/CGeneralTextHandler.h"
#include "../../../lib/mapObjects/CGHeroInstance.h" #include "../../../lib/mapObjects/CGHeroInstance.h"
CTradeableItem::CTradeableItem(Point pos, EType Type, int ID, bool Left, int Serial) CTradeableItem::CTradeableItem(const Rect & area, EType Type, int ID, bool Left, int Serial)
: CIntObject(LCLICK | HOVER | SHOW_POPUP, pos) : SelectableSlot(area, Point(1, 1))
, hlp(nullptr) , artInstance(nullptr)
, type(EType(-1)) // set to invalid, will be corrected in setType , type(EType(-1)) // set to invalid, will be corrected in setType
, id(ID) , id(ID)
, serial(Serial) , serial(Serial)
@@ -35,13 +33,15 @@ CTradeableItem::CTradeableItem(Point pos, EType Type, int ID, bool Left, int Ser
, downSelection(false) , downSelection(false)
{ {
OBJECT_CONSTRUCTION_CAPTURING(255 - DISPOSE); OBJECT_CONSTRUCTION_CAPTURING(255 - DISPOSE);
addUsedEvents(LCLICK);
addUsedEvents(HOVER);
addUsedEvents(SHOW_POPUP);
setType(Type); setType(Type);
if(image)
{ this->pos.w = area.w;
this->pos.w = image->pos.w; this->pos.h = area.h;
this->pos.h = image->pos.h;
}
} }
void CTradeableItem::setType(EType newType) void CTradeableItem::setType(EType newType)
@@ -248,7 +248,7 @@ const CArtifactInstance * CTradeableItem::getArtInstance() const
{ {
case EType::ARTIFACT_PLACEHOLDER: case EType::ARTIFACT_PLACEHOLDER:
case EType::ARTIFACT_INSTANCE: case EType::ARTIFACT_INSTANCE:
return hlp; return artInstance;
default: default:
return nullptr; return nullptr;
} }
@@ -257,7 +257,7 @@ const CArtifactInstance * CTradeableItem::getArtInstance() const
void CTradeableItem::setArtInstance(const CArtifactInstance * art) void CTradeableItem::setArtInstance(const CArtifactInstance * art)
{ {
assert(type == EType::ARTIFACT_PLACEHOLDER || type == EType::ARTIFACT_INSTANCE); assert(type == EType::ARTIFACT_PLACEHOLDER || type == EType::ARTIFACT_INSTANCE);
hlp = art; artInstance = art;
if(art) if(art)
setID(art->getTypeId()); setID(art->getTypeId());
else else
@@ -273,7 +273,7 @@ void TradePanelBase::updateSlots()
void TradePanelBase::deselect() void TradePanelBase::deselect()
{ {
for(const auto & slot : slots) for(const auto & slot : slots)
slot->selection->selectSlot(false); slot->selectSlot(false);
} }
void TradePanelBase::clearSubtitles() void TradePanelBase::clearSubtitles()
@@ -305,10 +305,10 @@ ResourcesPanel::ResourcesPanel(CTradeableItem::ClickPressedFunctor clickPressedC
for(const auto & res : resourcesForTrade) for(const auto & res : resourcesForTrade)
{ {
auto slot = slots.emplace_back(std::make_shared<CTradeableItem>(slotsPos[res.num], EType::RESOURCE, res.num, true, res.num)); auto slot = slots.emplace_back(std::make_shared<CTradeableItem>(Rect(slotsPos[res.num], slotDimension),
EType::RESOURCE, res.num, true, res.num));
slot->clickPressedCallback = clickPressedCallback; slot->clickPressedCallback = clickPressedCallback;
slot->pos.w = 69; slots.back()->pos.h = 66; slot->setSelectionWidth(selectionWidth);
slot->selection = std::make_unique<SelectableSlot>(Rect(slotsPos[res.num], slots.back()->pos.dimensions()), Point(1, 1), selectionWidth);
} }
updateSlotsCallback = updateSubtitles; updateSlotsCallback = updateSubtitles;
} }
@@ -325,10 +325,10 @@ ArtifactsPanel::ArtifactsPanel(CTradeableItem::ClickPressedFunctor clickPressedC
auto artType = arts[slotIdx].getNum(); auto artType = arts[slotIdx].getNum();
if(artType != ArtifactID::NONE) if(artType != ArtifactID::NONE)
{ {
auto slot = slots.emplace_back(std::make_shared<CTradeableItem>(slotsPos[slotIdx], EType::ARTIFACT_TYPE, artType, false, slotIdx)); auto slot = slots.emplace_back(std::make_shared<CTradeableItem>(Rect(slotsPos[slotIdx], slotDimension),
EType::ARTIFACT_TYPE, artType, false, slotIdx));
slot->clickPressedCallback = clickPressedCallback; slot->clickPressedCallback = clickPressedCallback;
slot->pos.w = 69; slot->pos.h = 66; slot->setSelectionWidth(selectionWidth);
slot->selection = std::make_unique<SelectableSlot>(Rect(slotsPos[slotIdx], slot->pos.dimensions()), Point(1, 1), selectionWidth);
} }
} }
updateSlotsCallback = updateSubtitles; updateSlotsCallback = updateSubtitles;
@@ -350,9 +350,9 @@ PlayersPanel::PlayersPanel(CTradeableItem::ClickPressedFunctor clickPressedCallb
int slotNum = 0; int slotNum = 0;
for(auto & slot : slots) for(auto & slot : slots)
{ {
slot = std::make_shared<CTradeableItem>(slotsPos[slotNum], EType::PLAYER, players[slotNum].num, false, slotNum); slot = std::make_shared<CTradeableItem>(Rect(slotsPos[slotNum], slotDimension), EType::PLAYER, players[slotNum].num, false, slotNum);
slot->clickPressedCallback = clickPressedCallback; slot->clickPressedCallback = clickPressedCallback;
slot->selection = std::make_unique<SelectableSlot>(Rect(slotsPos[slotNum], slot->pos.dimensions()), Point(1, 1), selectionWidth); slot->setSelectionWidth(selectionWidth);
slot->subtitle = CGI->generaltexth->capColors[players[slotNum].num]; slot->subtitle = CGI->generaltexth->capColors[players[slotNum].num];
slotNum++; slotNum++;
} }
@@ -366,13 +366,12 @@ CreaturesPanel::CreaturesPanel(CTradeableItem::ClickPressedFunctor clickPressedC
for(const auto & [creatureId, slotId, creaturesNum] : initialSlots) for(const auto & [creatureId, slotId, creaturesNum] : initialSlots)
{ {
auto slot = slots.emplace_back(std::make_shared<CTradeableItem>(slotsPos[slotId.num], auto slot = slots.emplace_back(std::make_shared<CTradeableItem>(Rect(slotsPos[slotId.num], slotDimension),
creaturesNum == 0 ? EType::CREATURE_PLACEHOLDER : EType::CREATURE, creatureId.num, true, slotId)); creaturesNum == 0 ? EType::CREATURE_PLACEHOLDER : EType::CREATURE, creatureId.num, true, slotId));
slot->clickPressedCallback = clickPressedCallback; slot->clickPressedCallback = clickPressedCallback;
if(creaturesNum != 0) if(creaturesNum != 0)
slot->subtitle = std::to_string(creaturesNum); slot->subtitle = std::to_string(creaturesNum);
slot->pos.w = 58; slot->pos.h = 64; slot->setSelectionWidth(selectionWidth);
slot->selection = std::make_unique<SelectableSlot>(Rect(slotsPos[slotId.num], slot->pos.dimensions()), Point(1, 1), selectionWidth);
} }
} }
@@ -384,11 +383,10 @@ CreaturesPanel::CreaturesPanel(CTradeableItem::ClickPressedFunctor clickPressedC
for(const auto & srcSlot : srcSlots) for(const auto & srcSlot : srcSlots)
{ {
auto slot = slots.emplace_back(std::make_shared<CTradeableItem>(slotsPos[srcSlot->serial], auto slot = slots.emplace_back(std::make_shared<CTradeableItem>(Rect(slotsPos[srcSlot->serial], srcSlot->pos.dimensions()),
emptySlots ? EType::CREATURE_PLACEHOLDER : EType::CREATURE, srcSlot->id, true, srcSlot->serial)); emptySlots ? EType::CREATURE_PLACEHOLDER : EType::CREATURE, srcSlot->id, true, srcSlot->serial));
slot->clickPressedCallback = clickPressedCallback; slot->clickPressedCallback = clickPressedCallback;
slot->subtitle = emptySlots ? "" : srcSlot->subtitle; slot->subtitle = emptySlots ? "" : srcSlot->subtitle;
slot->pos.w = srcSlot->pos.w; slot->pos.h = srcSlot->pos.h; slot->setSelectionWidth(selectionWidth);
slot->selection = std::make_unique<SelectableSlot>(Rect(slotsPos[slot->serial], slot->pos.dimensions()), Point(1, 1), selectionWidth);
} }
} }

View File

@@ -9,19 +9,17 @@
*/ */
#pragma once #pragma once
#include "../MiscWidgets.h"
#include "../Images.h" #include "../Images.h"
#include "../../../lib/networkPacks/TradeItem.h" #include "../../../lib/networkPacks/TradeItem.h"
class CTextBox;
class SelectableSlot;
enum class EType enum class EType
{ {
RESOURCE, PLAYER, ARTIFACT_TYPE, CREATURE, CREATURE_PLACEHOLDER, ARTIFACT_PLACEHOLDER, ARTIFACT_INSTANCE RESOURCE, PLAYER, ARTIFACT_TYPE, CREATURE, CREATURE_PLACEHOLDER, ARTIFACT_PLACEHOLDER, ARTIFACT_INSTANCE
}; };
class CTradeableItem : public CIntObject, public std::enable_shared_from_this<CTradeableItem> class CTradeableItem : public SelectableSlot, public std::enable_shared_from_this<CTradeableItem>
{ {
public: public:
std::shared_ptr<CAnimImage> image; std::shared_ptr<CAnimImage> image;
@@ -29,7 +27,7 @@ public:
int getIndex(); int getIndex();
using ClickPressedFunctor = std::function<void(const std::shared_ptr<CTradeableItem>&)>; using ClickPressedFunctor = std::function<void(const std::shared_ptr<CTradeableItem>&)>;
const CArtifactInstance * hlp; //holds ptr to artifact instance id type artifact const CArtifactInstance * artInstance; //holds ptr to artifact instance id type artifact
EType type; EType type;
int id; int id;
const int serial; const int serial;
@@ -43,7 +41,6 @@ public:
const CArtifactInstance * getArtInstance() const; const CArtifactInstance * getArtInstance() const;
void setArtInstance(const CArtifactInstance * art); void setArtInstance(const CArtifactInstance * art);
std::unique_ptr<SelectableSlot> selection;
bool downSelection; bool downSelection;
void showAllAt(const Point & dstPos, const std::string & customSub, Canvas & to); void showAllAt(const Point & dstPos, const std::string & customSub, Canvas & to);
@@ -53,7 +50,7 @@ public:
void showAll(Canvas & to) override; void showAll(Canvas & to) override;
void clickPressed(const Point & cursorPosition) override; void clickPressed(const Point & cursorPosition) override;
std::string getName(int number = -1) const; std::string getName(int number = -1) const;
CTradeableItem(Point pos, EType Type, int ID, bool Left, int Serial); CTradeableItem(const Rect & area, EType Type, int ID, bool Left, int Serial);
}; };
class TradePanelBase : public CIntObject class TradePanelBase : public CIntObject
@@ -89,6 +86,7 @@ class ResourcesPanel : public TradePanelBase
Point(0, 79), Point(83, 79), Point(166, 79), Point(0, 79), Point(83, 79), Point(166, 79),
Point(83, 158) Point(83, 158)
}; };
const Point slotDimension = Point(69, 66);
public: public:
ResourcesPanel(CTradeableItem::ClickPressedFunctor clickPressedCallback, UpdateSlotsFunctor updateSubtitles); ResourcesPanel(CTradeableItem::ClickPressedFunctor clickPressedCallback, UpdateSlotsFunctor updateSubtitles);
@@ -103,6 +101,7 @@ class ArtifactsPanel : public TradePanelBase
Point(83, 158) Point(83, 158)
}; };
const size_t slotsForTrade = 7; const size_t slotsForTrade = 7;
const Point slotDimension = Point(69, 66);
public: public:
ArtifactsPanel(CTradeableItem::ClickPressedFunctor clickPressedCallback, UpdateSlotsFunctor updateSubtitles, ArtifactsPanel(CTradeableItem::ClickPressedFunctor clickPressedCallback, UpdateSlotsFunctor updateSubtitles,
@@ -117,6 +116,7 @@ class PlayersPanel : public TradePanelBase
Point(0, 118), Point(83, 118), Point(166, 118), Point(0, 118), Point(83, 118), Point(166, 118),
Point(83, 236) Point(83, 236)
}; };
const Point slotDimension = Point(58, 64);
public: public:
explicit PlayersPanel(CTradeableItem::ClickPressedFunctor clickPressedCallback); explicit PlayersPanel(CTradeableItem::ClickPressedFunctor clickPressedCallback);
@@ -130,6 +130,7 @@ class CreaturesPanel : public TradePanelBase
Point(0, 98), Point(83, 98), Point(166, 98), Point(0, 98), Point(83, 98), Point(166, 98),
Point(83, 196) Point(83, 196)
}; };
const Point slotDimension = Point(58, 64);
public: public:
using slotsData = std::vector<std::tuple<CreatureID, SlotID, int>>; using slotsData = std::vector<std::tuple<CreatureID, SlotID, int>>;

View File

@@ -77,7 +77,7 @@ void CTradeWindow::initItems(bool Left)
{ {
if(mode == EMarketMode::ARTIFACT_RESOURCE) if(mode == EMarketMode::ARTIFACT_RESOURCE)
{ {
auto item = std::make_shared<CTradeableItem>(Point(137, 469), itemsType[Left], -1, 1, 0); auto item = std::make_shared<CTradeableItem>(Rect(Point(137, 469), Point()), itemsType[Left], -1, 1, 0);
item->recActions &= ~(UPDATE | SHOWALL); item->recActions &= ~(UPDATE | SHOWALL);
items[Left].push_back(item); items[Left].push_back(item);
} }