T3D 1.2 - Gui - Center issue - LOGGED (THREED-3145)
by elvince · in Torque 3D Professional · 12/21/2011 (8:36 am) · 3 replies
Issue:
In my gui I set a GuiBitmapCtrl set with horizSizing = "center" & vertSizing = "center";
When my gui is loaded, my bitmap is set its default place and not in the center of the screen.
If I open the gui manager (F10) then my bitmap is accurately positioned.
If I resize my game screen then my bitmap is accurately positioned.
Solution:
I looked briefly in the code and the only place where the center is managed is in GuiControl::parentResized.
I suspect, it's not called when the control is at the root level when the gui is loaded.
Thanks,
In my gui I set a GuiBitmapCtrl set with horizSizing = "center" & vertSizing = "center";
When my gui is loaded, my bitmap is set its default place and not in the center of the screen.
If I open the gui manager (F10) then my bitmap is accurately positioned.
If I resize my game screen then my bitmap is accurately positioned.
Solution:
I looked briefly in the code and the only place where the center is managed is in GuiControl::parentResized.
I suspect, it's not called when the control is at the root level when the gui is loaded.
Thanks,
About the author
Recent Threads
#2
I understand your workaround, but for me it's a bug that the horizSizing and vertSizing fields are not taken into account immediately when the UI is loaded.
Maybe, when the position is set (during the onAdd or during an update), it should look at those fields to override the value.
It's similar to "Center" in Word, are you expecting to change the size of your document to see the text centered?
I don't think this is a huge fix to implement, but this is part of the polishing of the editors & user friendly layer of Torque3D.
Thanks,
12/22/2011 (2:45 am)
Nathan,I understand your workaround, but for me it's a bug that the horizSizing and vertSizing fields are not taken into account immediately when the UI is loaded.
Maybe, when the position is set (during the onAdd or during an update), it should look at those fields to override the value.
It's similar to "Center" in Word, are you expecting to change the size of your document to see the text centered?
I don't think this is a huge fix to implement, but this is part of the polishing of the editors & user friendly layer of Torque3D.
Thanks,
#3
01/11/2012 (10:23 am)
Thank you for the bug report Elvince. I've gone ahead and logged this bug under ticket number THREED-3145 for review.
Torque Owner Nathan Martin
TRON 2001 Network