Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: abrk on January 17, 2016, 06:09:52 AM
-
Hi :)
I need Some Help
I have a curved line.every point of this line has a number.
I need a slider that can move on this curved line and show the related number at every point.
(just like the horizontal or vertical slider,but i need it to slide on a curved path)
How can i do it in NGUI?
Please Help me
Sorry of my bad English
& Thanks a lot
-
You will need to create a custom widget for that with your own custom OnFill function.
-
You will need to create a custom widget for that with your own custom OnFill function.
I don't know how to make custom widget or how to use OnFill function.
Would you please explain it for me?
Thanks in advance :)
-
Just have a look at how existing widgets are made. For example look at UITexture. It inherits from UIBasicSprite, overwriting its OnFill function which is what does the drawing. In UITexture's case it simply uses the Fill function inside Basic Sprite after figuring out the inner and outer rectangles of the texture (used for slicing). In its heart the OnFill function is simply about filling the geometry buffers. You can replace the whole thing with the UIBasicSprite's SimpleFill function for example -- it can't get any easier than that.