GUI Editing...
by Melv May · in Torque Game Engine · 09/15/2001 (2:33 pm) · 4 replies
Hi,
Maybe there is something I'm overlooking but has anyone noticed that if you position gui controls when editing (such as screen-centered controls) and then exit the editor, they are not centered?
The background is fit to the shrunken window and if you use this as a reference for the center you find it just isn't! Should there be scroll bars in this window and the background just clipped or is there a logical to physical error in the editor?
Or is it me?
Melv.
Maybe there is something I'm overlooking but has anyone noticed that if you position gui controls when editing (such as screen-centered controls) and then exit the editor, they are not centered?
The background is fit to the shrunken window and if you use this as a reference for the center you find it just isn't! Should there be scroll bars in this window and the background just clipped or is there a logical to physical error in the editor?
Or is it me?
Melv.
About the author
#2
09/15/2001 (3:24 pm)
Each control has a horizontal and vertical sizing option that affects how that control's position and size changes when its parent is resized. The GUI editor always edits the gui in 640x480, and returns the screen to the previous resolution when the editor is turned off. This way you can verify that your GUI sizes correctly at different resolutions. The root gui control is always resized to the resolution of the screen, and all of its children are resized according to their resizing rules.
#3
But yeah, align it to the center, that way it will center it regardless of the screen resolution.. the only way to get a true layout would be to represent the location (and extent in some cases) with percentages across/down the screen rather than actual screen coordinates.. percentages will scale to size, coordinates dont
-nohbdy
09/15/2001 (3:27 pm)
It's weird, yeah... if you want to center something on the screen it's best to set your Horizontal/Vertical alignment to 'center'.. it really only uses the coordinates if it's aligned to the top/bottom/left/right (and probably relative, which I haven't played with much but assume it means relative to the parent's coordinates) What bothers me though is how is something is aligned "left" it stays to the right, top->bottom bottom->top right->left :)But yeah, align it to the center, that way it will center it regardless of the screen resolution.. the only way to get a true layout would be to represent the location (and extent in some cases) with percentages across/down the screen rather than actual screen coordinates.. percentages will scale to size, coordinates dont
-nohbdy
#4
09/16/2001 (9:26 am)
Thanks Guys. ;)
Torque 3D Owner Phil Carlisle
If you use the coordinates for the control its in the right place.. I'll have a go and try and fix that little issue soon (its really getting to me :))
Phil.