Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: N3uRo on April 24, 2012, 04:22:53 PM
-
We have encountered two "problems":
- When you want to create a button it would be great to have a script where you can pass different sprites to different mouse/touch states like: press, release, over, out... Now you have to do it by code changing the "spriteName" property.
- The ability to create a scrollbar with a non scaling slider. An example: http://i.imgur.com/pnh66.jpg
-
Have you tried creating an Image Button?
-
Have you tried creating an Image Button?
Sorry, I didn't notice about it, thanks!!
And regarding the scrollbar?
-
Try creating a slider. It comes with a thumb property. The thumb can be anything you want to attach there. I've attached sprites, sliced sprites, labels with text, even lights at one point.
-
Try creating a slider. It comes with a thumb property. The thumb can be anything you want to attach there. I've attached sprites, sliced sprites, labels with text, even lights at one point.
But the problem with the slider is that you have to map the value (0..1) to the clipped content (calculate the X or Y depending if it's horizontal or vertical) or I'm I wrong? With the Scrollbar if you pass the reference to de UIDragPanel, it updates itself.
-
So what you're asking then is basically to allow using sliders to control panel movement, not just scroll bars? :)
-
That's really a desktop vs. handheld discussion. On Desktops you can always drag in the actual scrollbar, which handhelds only always are visual aides, since you drag the whole thing instead - like we do with dragpanels for instance.
If I was making something for the desktop, I'd like to have the desktop style scrollbar if possible.
-
So what you're asking then is basically to allow using sliders to control panel movement, not just scroll bars? :)
Yes, or allow a scrollbar mode that don't scale the slider so we can use a ball style slider.
Thanks!