Zoom Gui ?
by Alex_McX · in Torque Game Builder · 02/04/2010 (9:50 am) · 3 replies
There was a problem increase in scale GUI, at transition in widescreen mode.
sceneWindow2D.setExtent( %newWidth, %height );
[elementGUI_01].setExtent( $GUIWidth, $GUIheight );
[elementGUI_02].setExtent( $GUIWidth, $GUIheight );
All essence of a question in how to increase scale of all GUI, instead of each element separately.
Thank's.
sceneWindow2D.setExtent( %newWidth, %height );
[elementGUI_01].setExtent( $GUIWidth, $GUIheight );
[elementGUI_02].setExtent( $GUIWidth, $GUIheight );
All essence of a question in how to increase scale of all GUI, instead of each element separately.
Thank's.
About the author
#2
exec("~/gui/MainMenu.gui");
Canvas.pushDialog(MainMenu);
MainMenu.setExtent(150,150);
How to me to reduce or increase MainMenu?
GuiControl.setExtent - Does not work
Can through Canvas as that can be realised
02/04/2010 (12:06 pm)
all children element (VertSizing - relative, HorizSizing - relative)exec("~/gui/MainMenu.gui");
Canvas.pushDialog(MainMenu);
MainMenu.setExtent(150,150);
How to me to reduce or increase MainMenu?
GuiControl.setExtent - Does not work
Can through Canvas as that can be realised
#3
All toplevel controls added to the canvas (setContent or pushDialog) will automatically be sized to conform to the canvas extents. To put a control on the canvas that takes only part of the screenspace, wrap it inside a GuiControl and push the outer GuiControl to the canvas.
Also, for showing a main menu, you usually don't want to use pushDialog (since it's not a dialog) but rather setContent.
Otherwise, setExtent is the proper method to resize controls and will work as expected with child resizing.
02/04/2010 (12:31 pm)
All toplevel controls added to the canvas (setContent or pushDialog) will automatically be sized to conform to the canvas extents. To put a control on the canvas that takes only part of the screenspace, wrap it inside a GuiControl and push the outer GuiControl to the canvas.
Also, for showing a main menu, you usually don't want to use pushDialog (since it's not a dialog) but rather setContent.
Otherwise, setExtent is the proper method to resize controls and will work as expected with child resizing.
Associate Rene Damm
You need to properly set the horizontal and vertical resizing behavior of child controls for this to work. Then, when the parent is resized, its children will follow.
Look for the horizSizing and vertSizing properties on the controls.