Panel -> setDraggingBounds
-
I' playing around with the "draggable" option of panels and want to limit the area, the panel can be dragged in. I found the "setDraggingBounds" function, but don't no, how to define the variable to set up the dragging area.
const var Panel1 = Content.getComponent("Panel1"); const var area = ??? // <--- How to define that variable? Panel1.setDraggingBounds(area);
Can someone help?
-
@toxonic I haven't got HISE or the docs in front of me at the mo but 99% of the time when you see
area
it's an array in the format[x, y, width, height]
-
@d-healey Haha, in this moment i found out by checking your video about custom look and feel... ;-)
I thought, it had to be an array, but only put in width and height... thank you! :-) -
@d-healey Hmm, this way, it would be possible to build a simple XY pad, wouldn't it?
I tinkered a bit around, but i don't know, how to realize an onControl callback, since dragging the "drag" panel (Panel2), doesn't trigger the on control callback. Any ideas?In the following snippet, i use the onTimer callback, but that's not satisfying at all...
HiseSnippet 866.3ocsV0uaSCCD2tqYPCLDHwCPz9GZkFUskOkl.JqcCUAaqhBSfPngIws0ZN1QNNaKBwKEOY7FLNGm1jsUFPknppx2W49cm+cW5PkzmFGKUHbs2kFQQ3a5LJUnm1aJgIPC5iv2xYWRrlp7rp1JMhDGSCPX7Juxn.WqJJ6yOewVDNQ3SKTgPGHY9z2vBY5BsC69ZFmuCIf9NVXIueX2A9RQOIWl.3YEmVnHh+QjIz8HF2p3fvqtc.SKUizDMMF7YKYP5noxSDV+OfEy9JmZDZiFAOHqZTuoLdvvY0ZLBgqNrnxWwV420YWV.at9hNvsyL3UDQ4d.txUAo1+CPBWBRUsP5NNi7UrHcgECdtgy.AbgLl.s5xPw5KpxOvN8jfGBcyPxQzcTfv7Hp+3Vs1vC9owlttP6NV6cLQ4MjHn7NdOyaVjSn5dxvHo.Dput075M1zqTLDEk.Q7I34Aea2x9ym2z05cyXptuhLYBSLYKYhHHttIBSdynXMi0Dk1PAT0a0rUaiA2wIBeMSJ7jh8jZ59h5Mb+laM2u65cQSiGuPalBPI4b3otHy17kYgK8IbuSgRHGvPMWe8SypxbioWvXJXzsFjhXIm1LRwflyoWVUZiM+MvptHI7qT0FPCjmPmCP3F+7znU+6nQ91aqRNJECDL89Qzb4cj7.C8vb9xjNT90Mb58C5SzDCOLWG3WDUoYF3f6SOFFjsrxZN8owGokQY9lyQP3qoyrt1LNqosgXPputS141nSmOq28KcSKF7ed2SXA5oEJ9X2oT1jo5xZnBBz.rybkSq6eHscLo0AeO3gjZNz.NjmNGrKHLKUVIBmKOYFsERVEllFNamTsUQnyNyfmBscJqNBX3BcIzMu1QWd5F1qHCR3D84W1X1pla.nNmaB2LEKhY5zxac+G1.05J2.82Bw63Ljo8mtXLVYAXDHU+OvX9d60b1d7Xput.fUc14CK6R5+P5eqLQCDicIZEyvq1KIbDPB7oP1EvEcrgGUwLXYkaYjMcfQTQPlvYvmbisMx3bismYDER7UxC8sKLLuY35YZ.LIxdQXM3MxfrWaT1RDHNGX+IJDdI0g99lx+9.eawwzYIh4AKQLObIh4QKQLOdIh4IKQLO8Jiw7+CdYhVFZGG.EC2NaaJFucwZKzuHzaF9D�
-
@toxonic I have posted a couple of videos about building an xy pad (they might be Patron only at the moment, I'm not sure)