Hi all, I wonder how to disable the auto resizing GUI elements when resizing the main app window? I just want them to stay the same size that I defined in the Layout Editor, no matter how big or small is my rendering window.
Thanks for any ideas!
How to disable the auto resizing GUI elements?
Moderators: CEGUI MVP, CEGUI Team
Re: How to disable the auto resizing GUI elements?
The first step is to define all windows in absolute coordinates. In the editor you set the offset value in pixels and set the scale to zero. In program code you use UDim(0, 200) instead of UDim(0.25, 0) etc. The scale coordinate still comes handy in some situations, like if you want to align the window to the right edge you can set the left coordinate to (1, -200) and right coordinate to (1, 0).
The second thing you need is to set AutoScaled="false" in the .font and .imageset files that your project uses. For example:
The second thing you need is to set AutoScaled="false" in the .font and .imageset files that your project uses. For example:
Code: Select all
<?xml version="1.0" ?>
<Font Name="DejaVuSans-10" Filename="DejaVuSans.ttf" Type="FreeType" Size="10" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false"/>
Re: How to disable the auto resizing GUI elements?
Works great, just like you said! Big thanks!
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 1 guest