From ac12574f6100e6bd405a4e9990e679a354b2dfb4 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Fri, 15 Nov 2024 03:25:16 +0100 Subject: [PATCH] fix picture (regression) --- client/windows/CreaturePurchaseCard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/windows/CreaturePurchaseCard.cpp b/client/windows/CreaturePurchaseCard.cpp index b61adf9f1..50ddc9175 100644 --- a/client/windows/CreaturePurchaseCard.cpp +++ b/client/windows/CreaturePurchaseCard.cpp @@ -54,8 +54,8 @@ void CreaturePurchaseCard::switchCreatureLevel() auto index = vstd::find_pos(upgradesID, creatureOnTheCard->getId()); auto nextCreatureId = vstd::circularAt(upgradesID, ++index); creatureOnTheCard = nextCreatureId.toCreature(); - picture = std::make_shared(parent->pos.x, parent->pos.y, creatureOnTheCard); - creatureClickArea = std::make_shared(Point(parent->pos.x, parent->pos.y), picture, creatureOnTheCard); + picture = std::make_shared(picture->pos.x - pos.x, picture->pos.y - pos.y, creatureOnTheCard); + creatureClickArea = std::make_shared(Point(picture->pos.x - pos.x, picture->pos.y - pos.y), picture, creatureOnTheCard); parent->updateAllSliders(); cost->set(creatureOnTheCard->getFullRecruitCost() * slider->getValue()); }