Game Development Community

DrawUitl.Rect Question

by Al Hotchkiss · in Torque X 2D · 08/11/2007 (4:05 pm) · 0 replies

Is there anything special that needs to occur before this actually works? I have created a Hud component and in its _OnRegister method added the following:

ProcessList.Instance.AddAnimationCallback(Owner, this);

The Hud component is implementing IAnimationObject as such:

public void UpdateAnimation(float dt)
{
// implement GUI rendering here
DrawUtil.Rect(new RectangleF(20, 20, 50, 50), Microsoft.Xna.Framework.Graphics.Color.Yellow);
}

The Hud component is attached to a Tile Map object in TXB.

Can someone explain why this won't render a rectangle with a yellow border?

Thanks,
Al

About the author

Recent Threads