Multitouch passes through upper containers (Build2018.24410)

(WIN10 Build 2018.24410 or earlier.)

I hope multitouch works like the same as ‘panel’ , but currently multitouch always passes through upper containers.

Is that difficult to fix ?

Sorry for posting about multitouch again and again, but this would be my last topic.
mtouchbug.toe (30 KB)
mtouchdemo.mp4 (1.11 MB)

Having the same issue

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.

Hi, Selina.
Could you correct my toe file ?
I’m so confused.

hi Ebee,

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.

Take a look here:
multi_touch_example.tox (1.21 KB)

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:

green_boudnds = { "x_min" : 0.043, "x_max" : 0.64, "y_min" : 0.61, "y_max" : 0.97 } red_bounds = { "x_min" : 0.28, "x_max" : 0.87, "y_min" : 0.54, "y_max" : 0.88 } overlap_bounds = { "x_min" : 0.28, "x_max" : 0.627, "y_min" : 0.625, "y_max" : 0.88 }

Another function is added to test if a set of u, v vals is inside of a vals provided by one of those dictionaries:

[code]def bounds_check(downu, downv, min_max_dict):
inside_test = False

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:

if inside_both: both_box.par.bgalpha = 1 elif inside_green: green_box.par.fillalpha = 1 elif inside_red: red_box.par.fillalpha = 1

Does that help?

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.

Anyone please let me know if some advice.