GUICanvas Bounds wrong
by Full House Media (#0001) · in Torque X 2D · 11/19/2008 (8:49 am) · 1 replies
Trying to set up a split screen, i noticed the bounds of GUICanvas seemed wrong. This is the GUICanvas.OnRegister() implementation:
public override bool OnRegister()
{
_bounds.Width = GFX.GFXDevice.Instance.CurrentVideoMode.BackbufferHeight;
_bounds.Height = GFX.GFXDevice.Instance.CurrentVideoMode.BackbufferWidth;
return base.OnRegister();
}
i've changed my version to use the graphicsDevice's width for width and height for height. I assume this is not the intended funtionality.
public override bool OnRegister()
{
_bounds.Width = GFX.GFXDevice.Instance.CurrentVideoMode.BackbufferHeight;
_bounds.Height = GFX.GFXDevice.Instance.CurrentVideoMode.BackbufferWidth;
return base.OnRegister();
}
i've changed my version to use the graphicsDevice's width for width and height for height. I assume this is not the intended funtionality.
About the author
Torque Owner Leslie Young
www.garagegames.com/mg/forums/result.thread.php?qt=80067