فهرست منبع

adjusting the placement of artifact slots

SoundSSGood 1 سال پیش
والد
کامیت
539b2e596d

+ 1 - 1
client/widgets/CAltar.cpp

@@ -66,7 +66,7 @@ CAltarArtifacts::CAltarArtifacts(const IMarket * market, const CGHeroInstance *
 		CGI->generaltexth->zelp[570], std::bind(&CAltarArtifacts::sacrificeBackpack, this));
 	sacrificeBackpackButton->block(hero->artifactsInBackpack.empty());
 
-	arts = std::make_shared<CArtifactsOfHeroAltar>(Point(-365, -10));
+	arts = std::make_shared<CArtifactsOfHeroAltar>(Point(-365, -11));
 	arts->setHero(hero);
 
 	int slotNum = 0;

+ 1 - 1
client/widgets/CArtifactHolder.cpp

@@ -93,7 +93,7 @@ CArtPlace::CArtPlace(Point position, const CArtifactInstance * art)
 	image = std::make_shared<CAnimImage>(AnimationPath::builtin("artifact"), imageIndex);
 	image->disable();
 
-	selection = std::make_shared<CAnimImage>(AnimationPath::builtin("artifact"), ArtifactID::ART_SELECTION);
+	selection = std::make_shared<CAnimImage>(AnimationPath::builtin("artifact"), ArtifactID::ART_SELECTION, 0, -1, -1);
 	selection->visible = false;
 }
 

+ 7 - 0
client/widgets/CArtifactsOfHeroAltar.cpp

@@ -10,6 +10,7 @@
 #include "StdInc.h"
 #include "CArtifactsOfHeroAltar.h"
 
+#include "Buttons.h"
 #include "../CPlayerInterface.h"
 
 #include "../../CCallback.h"
@@ -27,6 +28,12 @@ CArtifactsOfHeroAltar::CArtifactsOfHeroAltar(const Point & position)
 		position,
 		std::bind(&CArtifactsOfHeroAltar::scrollBackpack, this, _1));
 	pickedArtFromSlot = ArtifactPosition::PRE_FIRST;
+
+	// The backpack is in the altar window above and to the right
+	for(auto & slot : backpack)
+		slot->moveBy(Point(2, -1));
+	leftBackpackRoll->moveBy(Point(2, -1));
+	rightBackpackRoll->moveBy(Point(2, -1));
 };
 
 CArtifactsOfHeroAltar::~CArtifactsOfHeroAltar()

+ 6 - 6
client/widgets/CArtifactsOfHeroBase.h

@@ -54,13 +54,13 @@ protected:
 
 	const std::vector<Point> slotPos =
 	{
-		Point(509,30),  Point(567,240), Point(509,80),  //0-2
-		Point(383,68),  Point(564,183), Point(509,130), //3-5
-		Point(431,68),  Point(610,183), Point(515,295), //6-8
-		Point(383,143), Point(399,194), Point(415,245), //9-11
-		Point(431,296), Point(564,30),  Point(610,30), //12-14
+		Point(509,30),  Point(568,242), Point(509,80),  //0-2
+		Point(383,69),  Point(562,184), Point(509,131), //3-5
+		Point(431,69),  Point(610,184), Point(515,295), //6-8
+		Point(383,143), Point(399,193), Point(415,244), //9-11
+		Point(431,295), Point(564,30),  Point(610,30), //12-14
 		Point(610,76),  Point(610,122), Point(610,310), //15-17
-		Point(381,296) //18
+		Point(381,295) //18
 	};
 
 	virtual void init(CHeroArtPlace::ClickFunctor lClickCallback, CHeroArtPlace::ClickFunctor showPopupCallback,

+ 2 - 2
client/windows/GUIClasses.cpp

@@ -677,9 +677,9 @@ CExchangeWindow::CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2,
 		manaValues[leftRight] = std::make_shared<CLabel>(155 + 490 * leftRight, qeLayout ? 66 : 71, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
 	}
 
-	artifs[0] = std::make_shared<CArtifactsOfHeroMain>(Point(-334, 150));
+	artifs[0] = std::make_shared<CArtifactsOfHeroMain>(Point(-334, 151));
 	artifs[0]->setHero(heroInst[0]);
-	artifs[1] = std::make_shared<CArtifactsOfHeroMain>(Point(98, 150));
+	artifs[1] = std::make_shared<CArtifactsOfHeroMain>(Point(98, 151));
 	artifs[1]->setHero(heroInst[1]);
 
 	addSetAndCallbacks(artifs[0]);