to avoid the "SetSubRect" of sprites, I oftenly do a
spr.SetImage(Image());
spr.SetImage(theNewImage);
And it works correctly.
But if I don't set a real image afterwards, the behaviour differs from a "fresh sprite": It draws a white rectangle instead of "nothing"
App.Draw(spr); //nothing
spr.SetImage(someLoadedImage);
App.Draw(spr); //an image
spr.SetImage(Image());
App.Draw(spr); //a white rect
I have a HUD display with prerendered numbers. 6 sprites, one for each number.
So setting the number is basically dividing by 10 a bunch of times and getting the modulo 10, and for each digit I have an image.
I wanted to reset the sprite to do "spaces", instead of showing zeros to the left. And assigning an alpha=0 image is to much of a hack.
Is there another poper whay I should know?
Thanks
-Martín