Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: NineTails on March 19, 2014, 11:52:27 AM
-
I'm having an issue getting my around the new slider in 3.5.
I've set up my slider so I can move it up and down but now I want to dynamically alter the slider so that it's length is equal to the length of one of my lists. How ever I know the slider only works on scale of 0-1.
How can I make it so the length of my slider is equal to that of a list with X amount inside it?
-
UISlider.value is always in 0-1 range, yes. What does it have to do with the length though? Slider length is defined by the size of the widget -- its width and its height. Not scale.
-
Ah ok.
My question still stands though. Is there a way I can set the width of this to equal my list length? I need to the two to sink,.
-
widget.width = Mathf.RoundToInt(scrollViewPanel.finalClipRegion.z);