I’m trying to get one (or more) smaller scrollViews that are put inside of one bigger one. But the scrollView touch listener only triggers for the parent one. How might I go about this? [import]uid: 147322 topic_id: 34394 reply_id: 334394[/import]
I don’t think you can do that with scroll views as they exist today. I know we are revamping a bunch of the widgets, but I don’t know how they will handle this in the future.
But now, the scrollView doesn’t have any touch events to pass on to other objects below it. The touch is consumed by the scrollView and you can’t put a scrollView inside another scrollView.
[import]uid: 199310 topic_id: 34394 reply_id: 136738[/import]
Do you think I could do a custom touch listener, that returns the scrollView’s touch listener if it’s in the parent’s bounds, but returns the small scrollView’s listener if it’s in the small scrollView’s bounds?
If so, how might I go about doing that? [import]uid: 147322 topic_id: 34394 reply_id: 136765[/import]
I’m not sure. Let me get the person who’s updating the widget’s opinion on this. I’m not sure what your trying to accomplish, but scrollViews may not be the right answer for you. ScrollViews are really nothing more than a displayGroup and you can put a touch/drag handler on the group, then inside the group, you can have another displayGroup with a touch handler and in that touch handler that senses which way it’s moving and if the movement needs to go to the parent group, you can forward that touch event on. I don’t believe our scrollViews were ever designed for multi-layering like that.
[import]uid: 199310 topic_id: 34394 reply_id: 136781[/import]
Ok, here’s exactly what I’m trying to do.
I’m building a GUI for CBEffects. It’s a prototype right now, and it’s coming right along, but now I’m trying to add the color option.
If you’ve downloaded CBEffects, you’ll know that you can specify as many colors as you want inside of the “color” parameter and it will choose a random one. So I’ve got a scrollView with all the parameters in it (well, not all of them - I’m still working on it) and one of them is the color parameter. The way I’ve gone about the color parameter is a button to add colors. When you click it, it creates the necessary sliders for RGB values (no alpha yet), a little lower down from any previous ones you’ve made.
Here’s an image to show what I mean
So that’s where the smaller scrollView comes in. The smaller scrollView holds each set of color sliders and test rectangle. But it’s inside of the larger one. So the larger scrollView masks the smaller scrollView’s listener.
I was wondering, though. Why arent’ sliders and buttons masked when inserted into a scrollView?
Do you have any other ideas of how I might make infinite options for color? I really don’t want to have to move everything down a notch every time you make a new one, and it would get pretty “dirty” with all the color sliders.
Caleb [import]uid: 147322 topic_id: 34394 reply_id: 136829[/import]
Let me get the widget folks to take a peek at this and see if they have any suggestions.
[import]uid: 199310 topic_id: 34394 reply_id: 136839[/import]
Hey Caleb.
The old scrollView widget code doesn’t support this, however the re-made scrollView code does support this.
So you can do this as soon as the remade widgets come out. [import]uid: 84637 topic_id: 34394 reply_id: 136887[/import]
Thank you, Danny and Rob Miracle!
Happy New Year’s! [import]uid: 147322 topic_id: 34394 reply_id: 136938[/import]
I don’t think you can do that with scroll views as they exist today. I know we are revamping a bunch of the widgets, but I don’t know how they will handle this in the future.
But now, the scrollView doesn’t have any touch events to pass on to other objects below it. The touch is consumed by the scrollView and you can’t put a scrollView inside another scrollView.
[import]uid: 199310 topic_id: 34394 reply_id: 136738[/import]
Do you think I could do a custom touch listener, that returns the scrollView’s touch listener if it’s in the parent’s bounds, but returns the small scrollView’s listener if it’s in the small scrollView’s bounds?
If so, how might I go about doing that? [import]uid: 147322 topic_id: 34394 reply_id: 136765[/import]
I’m not sure. Let me get the person who’s updating the widget’s opinion on this. I’m not sure what your trying to accomplish, but scrollViews may not be the right answer for you. ScrollViews are really nothing more than a displayGroup and you can put a touch/drag handler on the group, then inside the group, you can have another displayGroup with a touch handler and in that touch handler that senses which way it’s moving and if the movement needs to go to the parent group, you can forward that touch event on. I don’t believe our scrollViews were ever designed for multi-layering like that.
[import]uid: 199310 topic_id: 34394 reply_id: 136781[/import]
Ok, here’s exactly what I’m trying to do.
I’m building a GUI for CBEffects. It’s a prototype right now, and it’s coming right along, but now I’m trying to add the color option.
If you’ve downloaded CBEffects, you’ll know that you can specify as many colors as you want inside of the “color” parameter and it will choose a random one. So I’ve got a scrollView with all the parameters in it (well, not all of them - I’m still working on it) and one of them is the color parameter. The way I’ve gone about the color parameter is a button to add colors. When you click it, it creates the necessary sliders for RGB values (no alpha yet), a little lower down from any previous ones you’ve made.
Here’s an image to show what I mean
So that’s where the smaller scrollView comes in. The smaller scrollView holds each set of color sliders and test rectangle. But it’s inside of the larger one. So the larger scrollView masks the smaller scrollView’s listener.
I was wondering, though. Why arent’ sliders and buttons masked when inserted into a scrollView?
Do you have any other ideas of how I might make infinite options for color? I really don’t want to have to move everything down a notch every time you make a new one, and it would get pretty “dirty” with all the color sliders.
Caleb [import]uid: 147322 topic_id: 34394 reply_id: 136829[/import]
Let me get the widget folks to take a peek at this and see if they have any suggestions.
[import]uid: 199310 topic_id: 34394 reply_id: 136839[/import]
Hey Caleb.
The old scrollView widget code doesn’t support this, however the re-made scrollView code does support this.
So you can do this as soon as the remade widgets come out. [import]uid: 84637 topic_id: 34394 reply_id: 136887[/import]
Thank you, Danny and Rob Miracle!
Happy New Year’s! [import]uid: 147322 topic_id: 34394 reply_id: 136938[/import]