Centering a GUI on the screen
by Bryan Zarnett · in Torque Game Builder · 09/07/2009 (2:15 pm) · 2 replies
I have a GUI control set with a position of 0,0 and an extent of 800,600. The control within the GUI is centered.
When I push the GUI to the screen, the GUI is not centered.
I am using "Canvas.pushDialog(examineDetailsGui);" to push it to the screen.
What needs to be done to ensure that my GUI is centered on the screen.
Cheers,
Bryan
When I push the GUI to the screen, the GUI is not centered.
I am using "Canvas.pushDialog(examineDetailsGui);" to push it to the screen.
What needs to be done to ensure that my GUI is centered on the screen.
Cheers,
Bryan
#2
09/18/2009 (2:08 pm)
I get this problem all the time. If I've got a popup window, kind of likeFAKE CODE AHEAD!
new GuiControl(BlahWindowGUI) {
new GuiWindowCtrl(BlahWindow) {
... Objects inside Window ...
};
};That I need to set "center center" in both the BlahWindowGUI and BlahWindow.
Torque Owner Bruno Campolo