Author Topic: UISlider bug that resets fill direction  (Read 9385 times)

arkon3

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 71
    • View Profile
UISlider bug that resets fill direction
« on: March 31, 2014, 02:57:53 AM »
I have a bug in UISlider. The foreground sprite is set to Type=Filled, Flip=Nothing, FillDir = Radial360
When I run the game the FillDir gets reset to Horizontal and stays that way after I stop the game.

I can't seem to get 360 degree sliders to work anymore. Using latest version on the asset store.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISlider bug that resets fill direction
« Reply #1 on: March 31, 2014, 06:41:27 AM »
NGUI never supported 360 degree sliders. Sliders are always horizontal or vertical. It would be an interesting feature to add though. I'll make it happen in a future update.

arkon3

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 71
    • View Profile
Re: UISlider bug that resets fill direction
« Reply #2 on: March 31, 2014, 07:07:28 AM »
NGUI never supported 360 degree sliders. Sliders are always horizontal or vertical. It would be an interesting feature to add though. I'll make it happen in a future update.

Now I'm confused! I added your Control-Simple progress bar as I wanted a progress bar that looked like a timer or clock and so 360 degrees. Your control has a UISlider component. am I missing something?
 

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISlider bug that resets fill direction
« Reply #3 on: April 01, 2014, 10:13:36 AM »
A progress bar can use any type of a filled sprite.

A slider cannot. A slider implies reacting to user events -- and that's the exact difference between a slider and a progress bar in NGUI. The "Simple Progress Bar" that comes with NGUI uses the slider component just in case someone wants to make it interactable -- but in your case you would use a progress bar script, not a slider script.

The slider will work, mind you -- it just won't be able to respond to events properly if it's using a 360 filled sprite. There is no code for that.