#How to configure ProgressBar with Expand Margins and Border

3 messages · Page 1 of 1 (latest)

winter coyote
#

I'm working on pixel game and need to setup a health bar.
I'm using a ProgressBar as the base node and changing the appearance through Background and Fill style overrides.
Both Background and Fill use StyleBoxFlat.
For the Background, I'd like to have a 1px border all around.
For the Fill, I'm just changing the BG Color.

The problem I'm running into is that adding borders to Background style forces a minimum width and height of 2px, even though Expand Margins should cancel it out.

#

With max health of 3 and current health of 2, I would like to have a bar that's 3px wide and 1px tall, with a 1px border around it.

#

This is how it currently looks in the game