Author Topic: How to make progress bar completely disappear at 0%?  (Read 4261 times)

hurleybird

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
How to make progress bar completely disappear at 0%?
« on: June 20, 2014, 01:48:27 AM »
Hi. I'm currently using a few short progress bars to display health for shield/armor facings in a game that I'm making. However, I'm noticing that when the value on the progress bar is at 0 there is still a small, but very noticeable, amount showing. How do you make it so that a value of 0 completely makes the progress bar go away?

Fireball14

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 23
    • View Profile
Re: How to make progress bar completely disappear at 0%?
« Reply #1 on: June 20, 2014, 07:12:32 AM »
Use 0 Border on left and right of your 9 sliced sprite.

On side note you can always use script that will change Alpha value on UISlider to 0 while   slider value 0.

But still i think, if we could have bool that will turn off foreground if value is 0, than it would be a big help.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to make progress bar completely disappear at 0%?
« Reply #2 on: June 21, 2014, 02:42:06 PM »
Or use a filled sprite instead of a sliced sprite.

Changing the alpha will conflict with the auto-fade feature of scroll bars, so be careful with that.