I’m creating user interface on TD and trying to do a slide and push menu. And my problem is that I have buttons in my menu and when I touch the button and slide/swipe it, button triggered. And my question is what should I do so that when I swipe buttons in menu they don’t get pressed?
When you say slide, do you mean that your cursor moves over a button, without clicking it, and it’s triggered? If so, that might be a bug as I’ve not seen it in my experience with buttons. But additionally, you can set the “type” of button (i.e. momentary, toggle up/down) in the buttons settings, which could also be the issue.
I think he wants to create a UI that works like our phones. When you touch container/panel and within a few ms you swipe left/right by $threshold units, then you reposition that panel. If not, then your click is forwarded to the underlying buttons
TouchDesigner is unfortunately not very touch friendly and that functionality is afaik not supported with panel COMP based UIs. You can build your own Renderpick based UI, but that is a huge amount of work
Yeah, I talked about it. Thank you for the answer, I’ll try to solve it.
When you have a menu/page that you touch/slide/scroll and also have a button you want to push within that menu/page you have to store the position x/y on press and then compare that position to your touch position on release. Then compare the distance of the start position and the release position. If the distance is within a short range you set then it was a tap and release on a button, if the distance is beyond that then it was a slide/scroll. I hope that helps.