mirror of
https://github.com/Maschell/libgui-sdl.git
synced 2024-06-08 18:28:44 +02:00
Fix the getCenterY() implementation of GuiElement.
This commit is contained in:
parent
382e1009f2
commit
6b1f9ab683
|
@ -160,7 +160,7 @@ public:
|
||||||
pScale = parentElement->getScaleY();
|
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) {
|
} else if (alignment & ALIGN_BOTTOM) {
|
||||||
float pHeight = 0.0f;
|
float pHeight = 0.0f;
|
||||||
float pScale = 0.0f;
|
float pScale = 0.0f;
|
||||||
|
@ -170,7 +170,7 @@ public:
|
||||||
pScale = parentElement->getScaleY();
|
pScale = parentElement->getScaleY();
|
||||||
}
|
}
|
||||||
|
|
||||||
pCenterY -= pHeight * 0.5f * pScale - getHeight() * 0.5f * getScaleY();
|
pCenterY += pHeight * 0.5f * pScale - getHeight() * 0.5f * getScaleY();
|
||||||
}
|
}
|
||||||
return pCenterY;
|
return pCenterY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user