Author Topic: UIProgress.value is zero, Bar of Foreground displayed.  (Read 2275 times)

you_inoue

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 15
    • View Profile
UIProgress.value is zero, Bar of Foreground displayed.
« on: July 08, 2014, 02:05:26 AM »
Hi!
I am using NGUI3.6.7.

It is not much of an exaggeration, but the title, Bar of Foreground is displayed UIProgress.value despite zero.
I'm used in HitPoint gauge, but I'm having problems gauge is not empty.
Version was forgotten, but they did not appear in earlier versions.

And are used by rewriting as follows code as the current deal.

  1. UIProgress.ForceUpdate(Line333)
  2. ----------------------------------------------------------------------
  3. [NGUI3.6.7]
  4. UIBasicSprite sprite = mFG as UIBasicSprite;
  5.  
  6. if (isHorizontal)
  7. ----------------------------------------------------------------------
  8. [Rewrite]
  9. UIBasicSprite sprite = mFG as UIBasicSprite;
  10.  
  11. if (this.value > 0.001f)
  12.         mFG.enabled = true;
  13. else
  14.         mFG.enabled = false;
  15.  
  16. if (isHorizontal)
  17. ----------------------------------------------------------------------
  18.  

This specification or will return to the original in the future?

Fireball14

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 23
    • View Profile
Re: UIProgress.value is zero, Bar of Foreground displayed.
« Reply #1 on: July 08, 2014, 09:18:29 AM »
You can also use filled sprite.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIProgress.value is zero, Bar of Foreground displayed.
« Reply #2 on: July 08, 2014, 12:34:07 PM »
That seems fine to me, you_inoue. I will add it back in.

you_inoue

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: UIProgress.value is zero, Bar of Foreground displayed.
« Reply #3 on: July 09, 2014, 01:42:20 AM »
You can also use filled sprite.

Thank you.
We were thinking that too, but change is difficult because it is in large amounts's incorporated in UISlider.

That seems fine to me, you_inoue. I will add it back in.

Thank you in advance :)