Game Development Community

Gui Position Help

by DarkProfit · in Torque Game Engine · 06/27/2007 (10:22 am) · 2 replies

How do I position a gui when using pushDialog/popDialog???

new GuiControl(TestGUI) {
canSaveDynamicFields = "0";
Profile = "GuiModelessDialogProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "0 0";
Extent = "340 450";
MinExtent = "340 450";
canSave = "1";
Visible = "1";
hovertime = "1000";
}

I have tried messing with position, horiz, and vert but they seem to not read it?

I know if i do the gui in the playgui i can position etc. but i need to be able to load
this gui outside the playgui...

Any help would be appreciated as it is driving me nuts....

#1
06/27/2007 (10:45 am)
%theControl.resize(xPos, yPos, width, height);

however i recommend implementing GuiControl::reposition() as described in this resource because it's slightly more efficient and definitely easier to work with.
#2
06/27/2007 (10:49 am)
Cool thanks :)