Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Ronin on July 03, 2014, 09:57:46 AM

Title: How to make a slider increase from right to left with Thumb?
Post by: Ronin on July 03, 2014, 09:57:46 AM
I'm making filling bars for a fighting game and the right one need to fill from right to left vs the default left to right. TO make things worse, I need it to increase WITH a thumb.

I've tried to make foreground inverse filled horizontally, which works fine WITHOUT a thumb, but I need that thumb too...

Any idea on how I can achieve this? Are UISliders even the right way to go?
Title: Re: How to make a slider increase from right to left with Thumb?
Post by: ArenMook on July 04, 2014, 01:17:55 PM
Just have a regular slider, then invert the value you get from it.
  1. float myValue = 1f - slider.value;