So in the sample file posted, the green and red panel each have a multiTouch In DAT. The DAT takes in all touch events and passes them to the panel if it is inside the panel, they do not talk to each other. You’ll want a single multi touch in DAT to point to the parent panel of the 2 panels. Hope this helps.
I think what selina is saying is that in using the multitouch DAT you become responsible for determining where the user has pressed, and what to do with that information.
In modifying your example I used a single multitouchinDAT for the container holding both red and green squares. The callbacks DAT is modified to hold three dictionaries that represent the uv boundaries of the boxes:
x_min = min_max_dict.get('x_min')
x_max = min_max_dict.get('x_max')
y_min = min_max_dict.get('y_min')
y_max = min_max_dict.get('y_max')
# check u
if downu > x_min and downu < x_max:
# check v
if downv > y_min and downv < y_max:
inside_test = True
return inside_test[/code]
In your onDown() call you then check the input val against the objects. From here you can decide what to do with the results. You can see that I’ve added an example to change the alpha of the different boxes:
Hi, Matthew.
You are a super kind guy as always.
Thank you for your help !
I understand what you and Selina mean, but it would be more and more complicated if I
want to build complex UIs with a lot of floating containers.
I wish a simpler solution like panelCHOP or panelExec DAT would be added.