0 votes

I don't understand how work TextureProgress. I want to make such textureprogress:
I faced some difficulties. If i used "under texture" - 82px, progress - 80px. In inspector - "max value" - 20, i will get step 4 px in progress texture, if I calculate the tile, I’ll get glitch.

in inspector - "step" doesn't work as i need. Help me, plz!

in Engine by (16 points)

1 Answer

0 votes

You are not calculating your sizes properly. I remade your top picture at single-pixel size:

pixel-scaled copy

The "under" is 83 pixels wide, not 82.

The "progress" is 79 pixels wide from first yellow to last yellow. You'll need to choose which end has the extra space:

  • whether that 1 px bar comes before each progress bar (in which case, there needs to be extra 1 pixel space before first yellow)
  • or after each progress bar (in which case, there needs to be extra
    1 pixel space after last yellow)

in order for it to be the 80 pixels, which can be divided by 4 for each step.

by (16 points)

I went through it and it didn't work the way I needed, but I found a way out. Thanks for submitting the idea.

Look at what i did

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.