Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Dennis_N on January 30, 2014, 11:18:53 AM
-
I am trying to setup a scroll bar item following closely the demo scene example, which however uses a sliced sprite. Mine is just a non sliceable graphic that is shorter than the background of the scroll bar. I'm having a hard time making it slide the whole range of the background sprite. It just uses a fraction of that range for whatever reason. Please help me figure this out.
-
Some pictures of what you're trying to do would help me understand what you mean.
-
I can't post specific stuff due to NDA.
Lets say you load Scroll View (Panel) scene.
And replace the foreground target object on the scroll bar, with a different sprite from the NGUI sprites. Lets say a smiley. By default it will stretch to the length of 720 which will make it look weird, but it will still run the length of the scroll bar.
However any try to scale it down to proper proportions, will also scale down the length that it runs on the scroll bar.
So how can you possibly accommodate different size sprites and keep the same range?
-
Ok. I finally realized that that script (uiscroll bar) assigns a dynamic length to the slider, that is controlled by the size of the inventory it controls. I had to delete some inventory items to figure it out.
Is there a way to leave the slider length unaffected by the inventory size?
-
You could use a UISlider instead of a UIScrollBar.