GuiXFadeBitmapCtrl
by Chris "C2" Byars · in Torque Game Engine · 05/02/2006 (2:19 pm) · 5 replies
I use the GuiXFadeBitmapCtrl for an excellent bitmap fading GUI, however I use this paired with my weapon HUD image script, which calls "setBitmap" for each weapon when you swap weapons. Problem is, the GuiXFadeBitmapCtrl's bitmap fades out and doesn't come back. I need it to appear each time setBitmap is called, so the HUD image fades in then out nicely.
I'm not so great at the source, but if I can take some pointers I'm sure I could do this.
Thanks! :)
I'm not so great at the source, but if I can take some pointers I'm sure I could do this.
Thanks! :)
#2
05/05/2006 (3:34 pm)
Anything?
#3
Find this line:
Add this right after it:
Then just call the reset() method on any GuiXFadeBitmapCtrl to make it start fading again.
05/07/2006 (6:21 am)
You only need to set wakeTime to the current time and it starts fading again.Find this line:
IMPLEMENT_CONOBJECT(GuiXFadeBitmapCtrl);
Add this right after it:
ConsoleMethod(GuiXFadeBitmapCtrl, reset, void, 2, 2, "reset() re-starts the fade")
{
object->wakeTime = Platform::getRealMilliseconds();
object->done = false;
}Then just call the reset() method on any GuiXFadeBitmapCtrl to make it start fading again.
#4
05/07/2006 (6:49 am)
Whoa thanks :D
#5
Edit: Actually it appears it doesn't fade even without your addition. Guess it's not compatible with TSE MS3/TGE 1.4. Looks like someone left a comment on that resource page even asking for an update to work with TGE 1.4 (TSE MS3).
05/07/2006 (7:11 am)
Now it doesn't fade at all, no matter if I have "weaponHUD.reset();" or not. Edit: Actually it appears it doesn't fade even without your addition. Guess it's not compatible with TSE MS3/TGE 1.4. Looks like someone left a comment on that resource page even asking for an update to work with TGE 1.4 (TSE MS3).
Torque Owner Chris "C2" Byars
Ion Productions