Posted By: exile
How can I decrease this panel? - 07/06/13 09:10
So I have a health bar that I want to have decreased to the center. Its a shame that we dont have a library of simple functions like these at our disposal. Anyway, enough ranting. Here is what I am trying to do, I want to have a health bar clip its image from the outside going to the inside. I have checked into using the bmap pixel functions but they seem slow for what I need. I also considered using scale_x, however all that does is just stretch the panel without regard to the shape of the image on the bmap. I suppose its best to show in a series of pictures to show what i am looking for
Health = 100;
oooooooooooo
ooo ooo
Health = 60;
oooooooo
oo oo
Health = 30;
oooo
Health = 10;
oo
Notice how as the health gets lower, the image gets CLIPPED from the outsides towards the center of the image. It would be nice to have a simple CLIP flag for the panels which would instruct the engine to always clip anything outside of the panels size_x/size_y range. Heck even allowing manipulation of the bmaps position within the panel would be a treat.
Anyway, does anyone know of a way I could achieve this effect? Any suggestions would be most helpful. Thanks again guys.
Health = 100;
oooooooooooo
ooo ooo
Health = 60;
oooooooo
oo oo
Health = 30;
oooo
Health = 10;
oo
Notice how as the health gets lower, the image gets CLIPPED from the outsides towards the center of the image. It would be nice to have a simple CLIP flag for the panels which would instruct the engine to always clip anything outside of the panels size_x/size_y range. Heck even allowing manipulation of the bmaps position within the panel would be a treat.
Anyway, does anyone know of a way I could achieve this effect? Any suggestions would be most helpful. Thanks again guys.