Resolution-Independent GUI ?
by Scott Lahteine · in Torque Game Builder · 01/22/2006 (6:21 pm) · 2 replies
Hi,
I'm currently using T2D 1.0 but soon to move to 1.1a2.
My game brings up a custom GUI when the player presses ESC. The GuiBitmapButtonCtrls are centered within a 1024 x 768 area, but when the game resolution is set to anything else the buttons are no longer centered. I've tried setting horizSizing in the button to "center" but it doesn't do the trick. How can I keep my buttons centered?
Also the container for the GUI is a GuiChunkedBitmapCtrl with a tiled background. Regardless of the resolution these tiles don't scale, so there are more or fewer tiles displayed depending on whether the resolution is above or below 1024 x 768. How do I set the properties to make these tiles scale to fit when the resolution changes?
I'm currently using T2D 1.0 but soon to move to 1.1a2.
My game brings up a custom GUI when the player presses ESC. The GuiBitmapButtonCtrls are centered within a 1024 x 768 area, but when the game resolution is set to anything else the buttons are no longer centered. I've tried setting horizSizing in the button to "center" but it doesn't do the trick. How can I keep my buttons centered?
Also the container for the GUI is a GuiChunkedBitmapCtrl with a tiled background. Regardless of the resolution these tiles don't scale, so there are more or fewer tiles displayed depending on whether the resolution is above or below 1024 x 768. How do I set the properties to make these tiles scale to fit when the resolution changes?
#2
01/22/2006 (7:17 pm)
You should actually look at "relative", not "center." The underlying 1.4 engine (used by the alpha) seems to fix a lot of the Gui issues I was previously seeing in T2D (based on 1.3).
Torque Owner Scott Lahteine
Now, as for the GuiChunkedBitmapCtrl that needs to lie behind my game's fxSceneWindow2D, maybe something similar?