Game Development Community

Canvas Width/Height

by Leslie Young · in Torque X 2D · 10/15/2008 (2:19 pm) · 2 replies

Is this a bug or am I not understanding something here?
I was trying to get one of my GUI controls nice in the center of the window but it just would not do it so I ended up querying the Canvas for its Size and Bounds and found something strange that I was using width/height incorrectly.

In torqueSettings.xml I got ...

768
1024

Now this is what GUICanvas tells me...
GUICanvas.Instance.Size.X = 768
GUICanvas.Instance.Size.Y = 1024
GUICanvas.Instance.Bounds.Width = 768
GUICanvas.Instance.Bounds.Height = 1024

why is that ? o.O
I would think GUICanvas.Instance.Bounds.Width would be 1024 for example.

#1
10/15/2008 (9:48 pm)
It's a bug in GUICanvas. I reported this back in January
www.garagegames.com/mg/forums/result.thread.php?qt=71694
#2
10/16/2008 (2:17 am)
Thanks, guess I'm stuck with it since I don't have Torque X Pro. No biggy, at least I now know its just swapped :)