Author Topic: How to make a slider increase from right to left with Thumb?  (Read 2681 times)

Ronin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to make a slider increase from right to left with Thumb?
« Reply #1 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;