Game Development Community

GUI problem.

by Sam Cutler · in Game Design and Creative Issues · 08/29/2006 (11:01 am) · 2 replies

I use the Torque engine. Every time I move the buttons on my main menu (options, start, about and quit) they appear to have moved. But if I reopen the GUI editor the options button goes to the middle and the others just move. I save it after my edits but this still happens... Any ideas?

#1
08/30/2006 (12:58 pm)
When you are in menu edit mode ( F10) , click on a button and check the value of the fields :

HorizSizing
VertSizing

If you can read "center" : you have the explanation. Torque "center" automatically the button.

Change center value by an other one.
#2
08/30/2006 (1:19 pm)
I had a similar problem using Relative/Relative on my GUI buttons in 1024x768 resolution.

Every time I would place a button at a position and save it, the button would move to position X - 1, position Y - 1. I don't know why, but it's pretty annoying that it would subtract the values. Eventually, I just put it where it fit perfectly, then I manually changed the position by adding 1 to the X and Y values.

Furthermore, if my button was not sized an even power of 2 (64x32, for example), it would often alter the size of the button as well. Usually by adding or subtracting 1 from the X or Y. I doubt it's random, but it seemed random.

I have not had these problems working in the 640 x 480 resolution. I wish the 1024 x 768 resolution could be fixed to work better for developing stuff. Maybe if I dig into that engine code...