Update: UIButton click and drag drags scroll list

Update: UIButton click and drag drags scroll list

Postby atmEthanBehar » Sat Jun 15, 2013 5:46 pm

Hey all,

I ran into a problem when using two scroll lists. I have a pop up that comes up when a button is pressed. In the pop up there is a scroll list on the right(SLa) and one on the left (SLb). SLa controls the contents of SLb. So, If I scroll from item 1 in SLa to item 10 in SLa the contents in SLb will change to reflect SLa item 10's contents. Now my problems occurs when a uilistitem(thumb sprite) is clicked in SLb. If I click a thumb sprite in SLb and drag up and down, it drags up and down for both lists. What is going on here? Why does it do that?

Here is a visual representation of my problem: http://www.youtube.com/watch?v=96tKHjdi ... e=youtu.be

Please disregard any oddities in the video(thumb sprites disappearing randomly) Just focus on the fact that when I click a thumb sprite on the left and move up and down with the mouse it controls both scroll lists.

Any advice? If further information is needed please let me know and I'll respond ASAP

Thank you,
Ethan Behar
atmEthanBehar
 
Posts: 28
Joined: Mon Jan 07, 2013 2:10 pm

Re: Update: UIButton click and drag drags scroll list

Postby atmEthanBehar » Tue Jun 18, 2013 4:09 pm

Just and update:

I should correct myself, in the above example the thumb sprites have an invisible button on top of them. So when I say click the thumb sprite I'm actually referring to the invisible button on top of the thumb sprite. The button is child of the thumb sprite.

But I now removed the thumb sprites and buttonss from SLb. Now they are placed directly under the list but NOT part of the list. Even with this change the problem occurs.

So just to reiterate my problem is when I click and drag an UIButton it, drags for the scroll list next to it as well. I'll post a new video soon, just to clarify my situation.

-Ethan
atmEthanBehar
 
Posts: 28
Joined: Mon Jan 07, 2013 2:10 pm

Re: Update: UIButton click and drag drags scroll list

Postby Brady » Wed Jun 19, 2013 4:58 pm

First, are you using separate cameras for each list? Second, are you sure the colliders of the items from one list aren't overlapping the other list? Or perhaps the list's viewable area itself is overlapping? The viewable area you define will have a collider generated to occupy that area, so make sure the viewable area only occupies the area you want to be interactive for that list and keep them from overlapping.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Update: UIButton click and drag drags scroll list

Postby atmEthanBehar » Wed Jun 19, 2013 7:50 pm

1. The lists have the same camera. But my thumb sprites are not in the second list anymore. We removed them from the list and the thumb sprites are positioned under the text. I just had an idea what might be doing it, sometimes my buttons are positioned in the viewable area of second list. So, i thought the second list might be accepting that input and applying it incorrectly. But i just tested it and that isn't the case. (sometimes the sprites lie within the viewable area even though they aren't part of the list and sometimes they don't. It depends on how much content there is.)

2. The colliders are not overlapping. I doubled check the viewable areas and the box colliders. Neither overlap.

3. Here's a visual representation of the problem: http://www.youtube.com/watch?v=uUqvnU2X ... e=youtu.be
atmEthanBehar
 
Posts: 28
Joined: Mon Jan 07, 2013 2:10 pm

Re: Update: UIButton click and drag drags scroll list

Postby atmEthanBehar » Wed Jun 19, 2013 7:51 pm

The strange thing that bothers me is that the scroll list on the left doesn't move when I click and drag the UIButton. Only the right scroll list is affected.
atmEthanBehar
 
Posts: 28
Joined: Mon Jan 07, 2013 2:10 pm

Re: Update: UIButton click and drag drags scroll list

Postby Brady » Sun Jun 23, 2013 11:22 pm

What is your pointer type set to in UIManager?
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Update: UIButton click and drag drags scroll list

Postby atmEthanBehar » Mon Jun 24, 2013 1:07 pm

It is set to AUTO_TOUCHPAD. I know I messed around with that setting. I tried every different type and nothing work.

Brady, where can I debug the portion of the code that handles the input for the UIScrollList and the UIButton? More specifically the portion that handles the click and drag input. Is it in IUIObject or IEZDragDrop?

Thanks.
atmEthanBehar
 
Posts: 28
Joined: Mon Jan 07, 2013 2:10 pm

Re: Update: UIButton click and drag drags scroll list

Postby atmEthanBehar » Mon Jun 24, 2013 9:56 pm

Brady,

Do you think that maybe b/c of the prefab this is happening? I know I've edited the prefab numerous times. Is it possible that maybe the prefab is hold some incorrect information? Thus making the scroll and buttons connected some how?
At this point I'm not ruling out anything and it was a thought that popped into my head today.

-Ethan
atmEthanBehar
 
Posts: 28
Joined: Mon Jan 07, 2013 2:10 pm

Re: Update: UIButton click and drag drags scroll list

Postby Brady » Wed Jul 03, 2013 5:03 am

You could try recreating it with different prefabs or without prefabs at all, but I really don't think that's the issue.

As for the dragging, look at OnInput() inside the class of the control type you're using for the items. Then this gets forwarded either to an associated list (if it's a UIListItem or UIListButton) or forwarded to an associated container object (if it is a UIButton, etc, inside a UIListItemContainer). This input ultimately gets sent to UIScrollList.ListDragged().
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Update: UIButton click and drag drags scroll list

Postby atmEthanBehar » Mon Jul 08, 2013 2:23 pm

Brilliant!

Thanks Brady, that's what was happening. My uibutton's container was pointing to the scroll list which I didn't want. So I took care of that and now the UI button's solely act like buttons.

Much appreciation,
Ethan
atmEthanBehar
 
Posts: 28
Joined: Mon Jan 07, 2013 2:10 pm

Next

Return to EZ GUI General

Who is online

Users browsing this forum: No registered users and 7 guests

cron