Author Topic: UISlider : the UIlabel is moving according to the value  (Read 6182 times)

brian661

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 12
    • View Profile
UISlider : the UIlabel is moving according to the value
« on: September 04, 2014, 10:52:34 AM »
I am trying to make a HP bar, 
where I use the UILabel which was included to show the value of character Hp, like 100/100, 
While once I change the value in the UISlider (also for the Label mentioned above), 
the label moved from the right to the left, following the overlay of the slider   
 

How can I fix the Label on the right ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISlider : the UIlabel is moving according to the value
« Reply #1 on: September 04, 2014, 11:08:21 AM »
I don't understand the question. Label on the right? What label on the right?

brian661

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 12
    • View Profile
Re: UISlider : the UIlabel is moving according to the value
« Reply #2 on: September 04, 2014, 11:42:44 AM »
Sorry for me poor English. 
In the first image, the label 100/100 is in the correct position. 
While in the second image, the 100/100 is moving to the left when I changing the value of the slider. 
I would like to set the position as the first image shown

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISlider : the UIlabel is moving according to the value
« Reply #3 on: September 05, 2014, 09:23:38 AM »
It's moving because it's a child of the slider's thumb. If you don't want it to move, then just move it outside the thumb.