Game Development Community

Gui Bitmaps don't refresh

by DALO · in Torque Game Engine Advanced · 02/22/2007 (10:23 am) · 1 replies

Hello,
I have made custom health/weapon/clock/info huds that just calls a series of png's. It works beautifully in TGE, but TGEA won't refresh the gui's. I've noticed that if I go into F10 or F11 then back out my screen refreshes and my huds look correct. It won't refresh/load properly otherwise. I tried using Canvas.setContent(Canvas.getContent), it works but everytime it's called there's a 1/2 second pause in the game, which makes it look ugly.

I'm just wondering where in the engine code would it be to update all gui's? I looked into guiBitmapCtrl.cpp and TGE's guiBitmapCtrl.cc and didn't notice any difference, other that the gl and gfx switch.
Maybe I'm just looking in the wrong spot? or just simply missing a easy command?

Any suggestions?

Thx

#1
02/22/2007 (2:05 pm)
Found it, for those of you who may come across this I have found that porting TGE to TGEA has a lot of different procedures and methods. In TGE you can just simply change the path of a png for a guiBitmapCtrl and it would update, well in TGEA you have to set the bitmap -> ctrlName.setBitmap("path to png");