Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: hurleybird on June 20, 2014, 01:48:27 AM

Title: How to make progress bar completely disappear at 0%?
Post by: hurleybird 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?
Title: Re: How to make progress bar completely disappear at 0%?
Post by: Fireball14 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.
Title: Re: How to make progress bar completely disappear at 0%?
Post by: ArenMook 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.