Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: legacybass on June 14, 2013, 01:02:51 PM

Title: Slider thumb shifted right
Post by: legacybass on June 14, 2013, 01:02:51 PM
We're working on a project where we are using sliders to adjust certain settings.  Whenever I (or anyone on the team) create a slider, however, the thumb position is always shifted about 25% of the slider to the right.  So when the slider is at 100% the thumb falls off to the right of the slider, and when the slider is at 0% the thumb looks like it's at about 25%.  The foreground moves in the correct spot, but the thumb is shifted.  The attached pictures show the slider at 0%, 50%, and 100%.  I'm using the Widget Tool to create the sliders, but no matter how I adjust things the thumb always re-positions itself to the right offset.  How can I fix this without having to modify the UISlider script?
Title: Re: Slider thumb shifted right
Post by: ArenMook on June 14, 2013, 04:58:11 PM
o_O

First time I've seen that. I just tried it quickly here and everything works exactly as expected. The thumb doesn't get offset.
Title: Re: Slider thumb shifted right
Post by: legacybass on June 18, 2013, 12:26:45 PM
Any suggestions on how to fix it?  All of my co-workers have the same problem.  I've looked at the source to see if there's something weird going on, but it all looks like I'd expect it to.
Title: Re: Slider thumb shifted right
Post by: ArenMook on June 18, 2013, 02:11:09 PM
A more detailed look at your setup would help. As I said -- I have never seen this happen. Do you have some crazy padding offset on sprites? Do you do anything odd with the thumb, like have the thumb point to a game object that has an offset child sprite? Is your slider using the correct bottom-left pivot on the foreground and background sprites? The more info the better. A picture with the widget rectangles would help as well (what you see in the scene view).
Title: Re: Slider thumb shifted right
Post by: legacybass on June 18, 2013, 02:43:18 PM
Not sure how or why, but it must have been something with our atlas.  I tried to follow the tutorial again in case I missed something when I first did it and realized that the slider was suddenly working.  I recreated the atlas in our main project and found that it was suddenly behaving normally.  I compared every property I could to see what was different and couldn't see anything, so I have to assume that it was the atlas itself.  Weird, but I'm glad it's fixed.