1.5 GUI problems.
by Peterjohn Griffiths · in Torque Game Engine · 11/21/2006 (11:57 pm) · 5 replies
I have run into the following problems in Torque 1.5 Gui's and I can't find a way around them.
1) If you have a guiScrollCtrl and have a guiMLTextCtrl as its child, it doesnt' automaticaly resize its width relative to its parents width. Even when adding the following to the onwake function.
[guiMLTextCtrl_name].Extent = [guiScrollCtrl_name].Extent;
The parent window has the following
HorizSizing = "relative";
VertSizing = "relative";
Extent = "1024 768";
The Torque resolution is set to "640 X 480".
It would appear that this is relative to the resizing of the parent window, its like the calculations in the onwake function are done before the window is resized, then the guiScrollCtrl is resized accordingly but its child guiMLTextCtrl control isn't being resized.
2) When editing a GUI, the gui editor opens it in "1024 768". If you change this to "640 480" and save it, the info is saved into the GUI file but the editor still opens the file the next time at "1024 768" and not "640 480". Also when the GUI is opened to be displayed, even when it contains "640 480" hard coded inside it, the calculations done in section 1) above come out as if the GUI control is in a resolution of "1024 768". This is very strange. Do all GUI's now get resized up to "1024 768" when loaded for the onwake function and then resized down again to be displayed?. This has only started happening in Torque 1.5.
Both these issues seem to be very closely related. This is causing me a major issue with my GUI's as they need to have relative sizing.
Many thanks in advance.
Oh, and by the way....Love the rest of Torque 1.5....Great effects. Can't wait to get onto the level design.
1) If you have a guiScrollCtrl and have a guiMLTextCtrl as its child, it doesnt' automaticaly resize its width relative to its parents width. Even when adding the following to the onwake function.
[guiMLTextCtrl_name].Extent = [guiScrollCtrl_name].Extent;
The parent window has the following
HorizSizing = "relative";
VertSizing = "relative";
Extent = "1024 768";
The Torque resolution is set to "640 X 480".
It would appear that this is relative to the resizing of the parent window, its like the calculations in the onwake function are done before the window is resized, then the guiScrollCtrl is resized accordingly but its child guiMLTextCtrl control isn't being resized.
2) When editing a GUI, the gui editor opens it in "1024 768". If you change this to "640 480" and save it, the info is saved into the GUI file but the editor still opens the file the next time at "1024 768" and not "640 480". Also when the GUI is opened to be displayed, even when it contains "640 480" hard coded inside it, the calculations done in section 1) above come out as if the GUI control is in a resolution of "1024 768". This is very strange. Do all GUI's now get resized up to "1024 768" when loaded for the onwake function and then resized down again to be displayed?. This has only started happening in Torque 1.5.
Both these issues seem to be very closely related. This is causing me a major issue with my GUI's as they need to have relative sizing.
Many thanks in advance.
Oh, and by the way....Love the rest of Torque 1.5....Great effects. Can't wait to get onto the level design.
#2
11/29/2006 (4:47 pm)
1) is the GuiMLTextCtrl's sizing set to relative ?
#3
Thanks you Orion Elenzil.
I can't believe I missed that one.
Thank you for that, sometimes you just need someone not so closely involved to point out what you have just told them. LOL.
Strange it doesn't do it in 1.4 though!.
Thanks again Orion.
11/29/2006 (5:11 pm)
Oh....My.....Good......God!.Thanks you Orion Elenzil.
I can't believe I missed that one.
Thank you for that, sometimes you just need someone not so closely involved to point out what you have just told them. LOL.
Strange it doesn't do it in 1.4 though!.
Thanks again Orion.
#4
totally, getting some distance from problems can really help.
sorry i don't have any advice about your second question.
actually we rarely save our critical GUIs from the gui editor -
or actually, we'll sort of mock it up in the gui editor, save it out,
then hand-tweak the saved version.
otherwise weird things can happen if you're working at different resolutions.
11/29/2006 (5:13 pm)
Love it when they're that simple!totally, getting some distance from problems can really help.
sorry i don't have any advice about your second question.
actually we rarely save our critical GUIs from the gui editor -
or actually, we'll sort of mock it up in the gui editor, save it out,
then hand-tweak the saved version.
otherwise weird things can happen if you're working at different resolutions.
#5
Many thanks again Orion.
11/29/2006 (10:32 pm)
I can live with the second one, I just use the onwake to schedule a function call that then sorts it all out, just thought it was related.Many thanks again Orion.
Torque Owner Peterjohn Griffiths
Default Studio Name
Has anyone else noticed this problem?.