VertSizing and horiSizing don't appear to do anything?
by Ben Siders · in Torque Game Engine · 02/09/2005 (7:34 pm) · 3 replies
Hello hello.
I have a "startup" screen in my project that consists of a background jpg and one button labelled "exit". That's it. In the GUI editor, I position the exit button where I want it and then hit F10 to go to "playing" mode and the button moves.
Ok, so I did my research and saw that you have to fiddle with the vertSizing and HoriSizing settings.
Well, I did, and NO MATTER WHAT I set them too, no matter what combinations of values I try, that button jumps to the same odd place when I swap to "live" mode every time. Exact same place.
The only way I can find to make it go where I want is to position it off-center in the GUI Editor and keep checking where it goes "live" until it's where I want it.
I thought that was a pain but I could live with it. So I added 4 more controls - two text labels and two text input boxes. Those are beyond hope. Utterly beyond hope. They appear in apparantly totally random places on screen AND they're resized. One text input box is now the width the entire screen and is on top of its label which shrunk down to nothing, and the other box is tony and located nowhere near the other elements.
Can somebody please explain how this stuff works? The documentation is utterly useless. "It aligns the element to a border." Great. May as well have told me that the capacitor requires 1.21 gigawatts, that information is equally helpful. ;)
Thanks!
I have a "startup" screen in my project that consists of a background jpg and one button labelled "exit". That's it. In the GUI editor, I position the exit button where I want it and then hit F10 to go to "playing" mode and the button moves.
Ok, so I did my research and saw that you have to fiddle with the vertSizing and HoriSizing settings.
Well, I did, and NO MATTER WHAT I set them too, no matter what combinations of values I try, that button jumps to the same odd place when I swap to "live" mode every time. Exact same place.
The only way I can find to make it go where I want is to position it off-center in the GUI Editor and keep checking where it goes "live" until it's where I want it.
I thought that was a pain but I could live with it. So I added 4 more controls - two text labels and two text input boxes. Those are beyond hope. Utterly beyond hope. They appear in apparantly totally random places on screen AND they're resized. One text input box is now the width the entire screen and is on top of its label which shrunk down to nothing, and the other box is tony and located nowhere near the other elements.
Can somebody please explain how this stuff works? The documentation is utterly useless. "It aligns the element to a border." Great. May as well have told me that the capacitor requires 1.21 gigawatts, that information is equally helpful. ;)
Thanks!
About the author
#2
02/09/2005 (8:39 pm)
Whew! Thanks for the info Drew, that helps. Does the resolution that you use in the GUI editor have any bearing on what resolution the UI appears in when the user runs the game? For example, if I create a 1024x768 background splash jpg, and the user loads up the game - what resolution will it be displayed in?
#3
02/10/2005 (8:18 am)
No, the GUI editor resolution won't have any bearing on the actual resolution. Things will be moved and scaled depending on the settings in the GUI editor. For a bitmap, I believe if you set it to "relative" it will resize itself correctly. You can also try "width" and "height" in the horiz/vert settings, which basically does what it says, sets it to the width and height of the screen. If you set the minExtent equal to the extent, it will not get any smaller then that value.
Torque 3D Owner Drew Parker
If you want to place GUIs in an exact spot, like over a background bitmap, try using "relative" for both the horiz and vert sizings.
If you want to lock down a GUI element in a certain corner of your in-game HUD, use the sizings opposite of that corner. For instance, if you always want your health window to be in the lower right corner of the screen, position it, make the horizSizing "left" and the vertSizing "top", then hit the Apply button, and check it out in game. Try changing resolutions from the options menu (ctrl + o), it should work.
Good luck!