Drawing GUI health bar
Posted: Sat Feb 19, 2022 6:22 am
Hi there! I'm struggling with trying to find an appropriate method to create a scaling GUI health bar. I have the graphic I want to use and I want to change the size of said graphic as the player's health goes up or down (and having another one to act as a speedometer would also be nice).
I can't find a good way to get this done looking at the Irrlicht IGUIImage documentation. Would I use the setMaxSize functions from the base class to change the size of the element, or is there a better way? Is there some way to set up the bounds of the image? Any way to scale the element would be helpful - the only scaling I saw was done with the alignment and the scale-to-fit parent thing.
I can't find a good way to get this done looking at the Irrlicht IGUIImage documentation. Would I use the setMaxSize functions from the base class to change the size of the element, or is there a better way? Is there some way to set up the bounds of the image? Any way to scale the element would be helpful - the only scaling I saw was done with the alignment and the scale-to-fit parent thing.