Animated sprites in GUIBitmap?
by Jonathan Skinner · in Torque X 2D · 06/25/2007 (9:06 am) · 1 replies
GUIBitmap appears to accept only static images. I'm trying to implement an animated sprite, such as a health bottle, into a HUD (using the whole GUICanvas, GUIBitmap, GUIText etc.)
As I say, I can't find a way to get GUIBitmap to use T2DAnimatedSprite.PlayAnimation
I don't particularly want to implement the fallback solution, a really hacky "get each animation frame, destroy the GUIBitmap, create a new one with the next animation frame" through ProcessTick or other function. That would totally suck as well as be counter-intuitive.
Any ideas?
As I say, I can't find a way to get GUIBitmap to use T2DAnimatedSprite.PlayAnimation
I don't particularly want to implement the fallback solution, a really hacky "get each animation frame, destroy the GUIBitmap, create a new one with the next animation frame" through ProcessTick or other function. That would totally suck as well as be counter-intuitive.
Any ideas?
About the author
Torque Owner Matias Kiviniemi
In addition, if you have a SplitScreen solution, you need to set the T2DSceneObject.ObjectType and GUISceneView.NoRenderMask so that they don't get rendered in everyones screen. For example with 2 players:
Player1HudObject.ObjectType = TorqueObjectDatabase.Instance.GetObjectType("Player1HUD"); Player1SceneView.NoRenderMask = TorqueObjectDatabase.Instance.GetObjectType("Player2HUD");Matias