Scrolling GUItexture

Hi everybody. im trying to do scrolling guitexture with mouse scrollwheel. But i have no idea how to do. i have slider, some GUITexture, and i need to write script, when i will start to scroll GUITexture will move down or up. Thank you for your time to help me…

slider - this is my slider, when i will start to scroll will to move down or up
podlozka - this is white background
kolajSlider - this is light green line

slider is parent of all GUItexture, what can u see in the picture…

Thanks

I don’t know yet to use the scroll whell, but i know how to make your slider work with regular click. Add a script to your slider button, with the OnMouseDrag function in it. In that function, make the pixel inset of the slider button to be equal to the Y Mouse position. add a static variable in that script to record the move of the slider. The start position of your slider button must correspond to 0 for the static var. When you move the slider With OnMouseDrag, it must calculate the Startposition of the slider button minus its actual position and give that value to the static variable. Then, you only need to add a script to each of your scroll list element. In the Update function of that script, make the pixel inset of the element be equal to its start (defaut) pixel inset + the value of the static var. This is how I do. It shouldn’t be difficult to add the scroll wheel to that. It must just make the pixel inset of the button to change, apply that change to the static var and then the scroll list elements should follow, as for the OnMouseDrag function.

yes, i know, because i use this script with OnMouseDrag function yet… all time when i click to slider and move mouse, slider follows position.y, but i need to add scrollwheel controller… and this is my problem, because i dont know how to do.

the scroll wheel is just an input axis

Input.GetAxis("Mouse ScrollWheel")