Force GUI Update
by AIDan · in Torque Game Engine · 10/15/2001 (8:33 am) · 4 replies
Hi
When I pickup a weapon, it changes my crosshair.
EgoCrosshair.bitmap= %data.crosshairFile;
But the crosshair does not appear. When I enter the editor and leave it again, the crosshair appears.
How can I force him to update the crosshair directly??
greetings
Daniel
When I pickup a weapon, it changes my crosshair.
EgoCrosshair.bitmap= %data.crosshairFile;
But the crosshair does not appear. When I enter the editor and leave it again, the crosshair appears.
How can I force him to update the crosshair directly??
greetings
Daniel
About the author
#2
something like this: hud.setbitmap(bitmap);
That worked for me
10/15/2001 (9:15 am)
use the function setbitmap instead of changing the bitmap manualysomething like this: hud.setbitmap(bitmap);
That worked for me
#3
10/15/2001 (9:24 am)
It works. my mistake. You cannot use ~
#4
The relative path and mod root stuff is something we added fairly recently (a couple months ago) and it isn't quite fully supported.
10/15/2001 (6:07 pm)
This is something that we should look into fixing, right now only the datablocks accept relative paths, include the mod root '~', so you must pass fully specified files to functions like gui.setBitmap("filename");The relative path and mod root stuff is something we added fairly recently (a couple months ago) and it isn't quite fully supported.
Torque Owner AIDan
It seems like it is not loaded.
Other question: How can I keep a bitmap in the memory??
I use another crosshair when I zoom. Everytime I change zoom, it loads the bitmap again. That makes the game stuck for a half second.
And a half second is much in a game.
greetings
Daniel