Fix the getCenterY() implementation of GuiElement.

This commit is contained in:
Maschell 2020-10-03 19:11:57 +02:00
parent 382e1009f2
commit 6b1f9ab683
1 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ public:
pScale = parentElement->getScaleY();
}
pCenterY += pHeight * 0.5f * pScale + getHeight() * 0.5f * getScaleY();
pCenterY -= pHeight * 0.5f * pScale - getHeight() * 0.5f * getScaleY();
} else if (alignment & ALIGN_BOTTOM) {
float pHeight = 0.0f;
float pScale = 0.0f;
@ -170,7 +170,7 @@ public:
pScale = parentElement->getScaleY();
}
pCenterY -= pHeight * 0.5f * pScale - getHeight() * 0.5f * getScaleY();
pCenterY += pHeight * 0.5f * pScale - getHeight() * 0.5f * getScaleY();
}
return pCenterY;
}