Page 1 of 1

How to disable the auto resizing GUI elements?

Posted: Wed Oct 06, 2010 11:38
by shinyclaw
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!

Re: How to disable the auto resizing GUI elements?

Posted: Wed Oct 06, 2010 13:23
by Timo
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:

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?

Posted: Wed Oct 06, 2010 15:00
by shinyclaw
Works great, just like you said! Big thanks!