浏览代码

Merge pull request #4590 from Laserlicht/fix_kingdom

fix kingdom overview
Ivan Savenko 1 年之前
父节点
当前提交
500d17a4a4
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      client/windows/CKingdomInterface.cpp

+ 7 - 7
client/windows/CKingdomInterface.cpp

@@ -879,9 +879,9 @@ public:
 	std::shared_ptr<CAnimImage> background;
 	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);
 		pos = background->pos;
 		for(int i=0; i<9; i++)
@@ -897,9 +897,9 @@ public:
 	std::shared_ptr<CButton> btnLeft;
 	std::shared_ptr<CButton> btnRight;
 
-	BackpackTab()
+	BackpackTab(CIntObject * parent)
 	{
-		OBJECT_CONSTRUCTION;
+		OBJECT_CONSTRUCTION_TARGETED(parent);
 		background = std::make_shared<CAnimImage>(AnimationPath::builtin("OVSLOT"), 5);
 		pos = background->pos;
 		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;
 
 	artTabs.resize(3);
-	auto arts1 = std::make_shared<ArtSlotsTab>();
-	auto arts2 = std::make_shared<ArtSlotsTab>();
-	auto backpack = std::make_shared<BackpackTab>();
+	auto arts1 = std::make_shared<ArtSlotsTab>(this);
+	auto arts2 = std::make_shared<ArtSlotsTab>(this);
+	auto backpack = std::make_shared<BackpackTab>(this);
 	artTabs[0] = arts1;
 	artTabs[1] = arts2;
 	artTabs[2] = backpack;