Ver Fonte

Fix corrupted shadow on ship image in shipyard

Ivan Savenko há 1 ano atrás
pai
commit
bc9937e72c
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 2 1
      client/windows/GUIClasses.cpp
  2. 1 1
      client/windows/GUIClasses.h

+ 2 - 1
client/windows/GUIClasses.cpp

@@ -744,8 +744,9 @@ CShipyardWindow::CShipyardWindow(const TResources & cost, int state, BoatId boat
 		AnimationPath boatFilename = boatConstructor->getBoatAnimationName();
 
 		Point waterCenter = Point(bgWater->pos.x+bgWater->pos.w/2, bgWater->pos.y+bgWater->pos.h/2);
-		bgShip = std::make_shared<CAnimImage>(boatFilename, 0, 7, 120, 96, 0);
+		bgShip = std::make_shared<CShowableAnim>(120, 96, boatFilename, CShowableAnim::CREATURE_MODE, 100, 7);
 		bgShip->center(waterCenter);
+		bgWater->needRefresh = true;
 	}
 
 	// Create resource icons and costs.

+ 1 - 1
client/windows/GUIClasses.h

@@ -296,7 +296,7 @@ public:
 class CShipyardWindow : public CStatusbarWindow
 {
 	std::shared_ptr<CPicture> bgWater;
-	std::shared_ptr<CAnimImage> bgShip;
+	std::shared_ptr<CShowableAnim> bgShip;
 
 	std::shared_ptr<CLabel> title;
 	std::shared_ptr<CLabel> costLabel;