1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

fix kingdom overview

This commit is contained in:
Laserlicht
2024-09-13 01:44:11 +02:00
parent 75f8614f26
commit 789dec0c82

View File

@@ -879,9 +879,9 @@ public:
std::shared_ptr<CAnimImage> background; std::shared_ptr<CAnimImage> background;
std::vector<std::shared_ptr<CArtPlace>> arts; std::vector<std::shared_ptr<CArtPlace>> arts;
ArtSlotsTab() ArtSlotsTab(CIntObject * parent)
{ {
OBJECT_CONSTRUCTION; OBJECT_CONSTRUCTION_TARGETED(parent);
background = std::make_shared<CAnimImage>(AnimationPath::builtin("OVSLOT"), 4); background = std::make_shared<CAnimImage>(AnimationPath::builtin("OVSLOT"), 4);
pos = background->pos; pos = background->pos;
for(int i=0; i<9; i++) for(int i=0; i<9; i++)
@@ -897,9 +897,9 @@ public:
std::shared_ptr<CButton> btnLeft; std::shared_ptr<CButton> btnLeft;
std::shared_ptr<CButton> btnRight; std::shared_ptr<CButton> btnRight;
BackpackTab() BackpackTab(CIntObject * parent)
{ {
OBJECT_CONSTRUCTION; OBJECT_CONSTRUCTION_TARGETED(parent);
background = std::make_shared<CAnimImage>(AnimationPath::builtin("OVSLOT"), 5); background = std::make_shared<CAnimImage>(AnimationPath::builtin("OVSLOT"), 5);
pos = background->pos; pos = background->pos;
btnLeft = std::make_shared<CButton>(Point(269, 66), AnimationPath::builtin("HSBTNS3"), CButton::tooltip(), 0); btnLeft = std::make_shared<CButton>(Point(269, 66), AnimationPath::builtin("HSBTNS3"), CButton::tooltip(), 0);
@@ -915,9 +915,9 @@ CHeroItem::CHeroItem(const CGHeroInstance * Hero)
OBJECT_CONSTRUCTION; OBJECT_CONSTRUCTION;
artTabs.resize(3); artTabs.resize(3);
auto arts1 = std::make_shared<ArtSlotsTab>(); auto arts1 = std::make_shared<ArtSlotsTab>(this);
auto arts2 = std::make_shared<ArtSlotsTab>(); auto arts2 = std::make_shared<ArtSlotsTab>(this);
auto backpack = std::make_shared<BackpackTab>(); auto backpack = std::make_shared<BackpackTab>(this);
artTabs[0] = arts1; artTabs[0] = arts1;
artTabs[1] = arts2; artTabs[1] = arts2;
artTabs[2] = backpack; artTabs[2] = backpack;