Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: N3uRo on April 24, 2012, 04:22:53 PM

Title: Two proposals
Post 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
Title: Re: Two proposals
Post by: ArenMook on April 24, 2012, 11:37:31 PM
Have you tried creating an Image Button?
Title: Re: Two proposals
Post by: N3uRo on April 25, 2012, 01:08:28 AM
Have you tried creating an Image Button?

Sorry, I didn't notice about it, thanks!!

And regarding the scrollbar?
Title: Re: Two proposals
Post by: ArenMook on April 25, 2012, 01:10:10 AM
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.
Title: Re: Two proposals
Post by: N3uRo on April 25, 2012, 12:32:36 PM
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.
Title: Re: Two proposals
Post by: ArenMook on April 25, 2012, 02:39:10 PM
So what you're asking then is basically to allow using sliders to control panel movement, not just scroll bars? :)
Title: Re: Two proposals
Post by: Nicki on April 25, 2012, 04:10:15 PM
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.
Title: Re: Two proposals
Post by: N3uRo on April 26, 2012, 12:32:29 PM
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!