Operating System: Windows 10
Render System: OpenGL
Hi,
I have a TextAreaOverlayElement which, when created, is offset to one side. I wanted the text to be centred at the position I specified for it. Upon looking at the member functions for this class, I found the alignment functions. I tried the following function:
Code: Select all
textElement->setAlignment(textElement->Center);
Code: Select all
textElement->setHorizontalAlignment(Ogre::GuiHorizontalAlignment::GHA_CENTER);
textElement->setVerticalAlignment(Ogre::GuiVerticalAlignment::GVA_CENTER);
Could anyone clarify what I'm doing wrong? The setAlignment function only seems to center horizontally, and the horizontal and vertical functions don't seem to have any effect full stop.
Thanks in advance.