Text Box Positioning with UnifiedAreaRect

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

CrimsonGT
Just popping in
Just popping in
Posts: 7
Joined: Mon Jul 12, 2010 12:30

Text Box Positioning with UnifiedAreaRect

Postby CrimsonGT » Sat Jul 17, 2010 16:04

I managed to get my editbox somewhat positioned where I want it with "<Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.45,0},{0.6,0},{0.48,0}}" />" but it is just roughly positioned. Im extremely anal, so I am wondering if there is a more precise way to position elements. Something like xPos = (ParentWindowWidth / 2) - (TextBoxWidth / 2). Obviously I can't do math operations from the layout file, but I am wondering if something more precise is there that I am missing.

User avatar
emarcotte
Quite a regular
Quite a regular
Posts: 55
Joined: Fri Dec 26, 2008 14:30
Contact:

Re: Text Box Positioning with UnifiedAreaRect

Postby emarcotte » Sun Jul 18, 2010 12:54

Sounds like you want the item centered? I believe you can set the window alignment to "Centre". Then, all you really need to do is set the dimensions. I don't have any samples in front of me unfortunately.


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 15 guests