There are few ways to do this. But here is what I would do.
Let’s take a variable called FuelStatus which will represent the percentage of fuel in the spaceship. 100% means FuelStatus= 1.00 and 0% means FuelStatus = 0.00. All the other values are in between 0.99 and 0.01.
Now we can multiply FuelStatus with height or width of a sprite to scale it to a percentage of its own size.
E.g
FuelMeter.Width * FuelStatus
This will create a progress bar
FuelMeter.Height * FuelStatus
This will be like a bar rising or shrinking in height.
But we have to do it every time FuelStatus is changed to keep everything uptodate.