Any way to create a button thats a vector svg in a panel
-
and check if mouse cursor is inside the path exactly to use as a button?
Here is a basic example of what i am trying to do:
HiseSnippet 1057.3ocsV0saaaCElJIJq1acaEX2z6HxUJ.ZtRJww1XnXswIovXKoFycACnXnfQh1hHTjBRzwyXHOB6cXOP6gYWua5Njzx+r340ZfI.Kqy467I9Qxy4P0uPFSKKkEHmZuYZNE47YtClJTocSILAp2YHmO28RRohVfstNcZNorjlfbb18UZGN01CYt9yu8TBmHhoKbgPWKYwzumkwTK71+EeGiyufjPeCKaonO9E8hkhtRtbLnmccCP4j3aIinWQzgsiKxY+ySXJYw.EQQKgXNUlLcPpbhvF+0rR1Mbp1HDM.dQV2ntoLdR+p4ZIB4rW+Ey7csy7ux8RVBat+Eq.eoA.ufwxqAN6rIIE9QHImkjzdVI8D2AwErb0BDsd9T2dBXCYHAVpWVJ1XQ67a651UBQHTMxH2Run.Llyv6jf.eLb6vuoNrZWpv2QJv8IBJG+bbEORRhwk2Al+NvGCjzTVhS9RwGWPgoeehJ0SGzydFVKKLQfIEEjo3ILUJVLN6FZQIVIwbIIAO35WgYYv9aY87FZOfRyNinHduMLLvOLniObOps+Ic7Oos+QQ9MC8CaA1s76zdErlQ9QQs7Ca1TCFEAXMAuM0XQQM8iBN1O7nVZPKsiZuFH3k11uCvO7ekWqGNZKArhDCCZuA82AvCA7feVufU2rL2njp5CYcpePNVwDTugiEwJlT3M5v5+ZcLbMRGisDwy9WYiIoLEEdKV7gPskYiH2G+VXg.a+A2BCLCFFW+d8XNeHuTNtj1kv42.kaKFS5cvNa03xFZsaDyYw2RSNz30houfc7RxcTrJkBIG7wT7PXyzXloe8XCu4gqRYkMRfs5FIPkx0FBO25cDUYr8lMizWPZVojSajW.KNdGjR4b4Ayvu2NapjMVJtRpnuV3okds52WG+OgFNbsX5b4BImSKVKrtWUwlH5Yyu8sy+4ABEyq1gX+OrNDw1RqkBTJ5IXpWmSmYegjmnq70O+v9InY0lvS+XOcUktEyLePb4zBESKGmyn2A8nsMbp4dFs7VkL2DaVtTneCNORYPebU6HclChAC8m3Ze9WPNtN5d3SqdXBKQkpM9KvHkxFkpzV+NXAYZxIU4afB9B2Wx43ENtYT0Y.01+oO8Odu8PiGzbDZKKSFyIpU6UqOTZF.r8rRCRcSPQISMc4Cs9HZfGrwF3enR7It8Yp3z0qwcViFgMt+Oz3ri8dr64CGRiUKD3dtW7Sa6Yb+GCusw1nKIpBlNm4pwYCfc5XJL5BHQpTmiriN40ZGTkNMfJRLFuGtlAFpsclAFVAhxHwEx2EaKJ0Gr9HiGPSBy2QTC9fFvFGhLEp.O2fFAnL3L92EGqm9eMTOsdNQaAmi1BNGuEbZtEbNYK3zZK3zdibzed0KGqjY1xAvQ+yMcrbbNWPfLKSVH5uAn4K2WB
the console.print("hello"); needs to fire only when the mouse is inside the path and not panel
-
Try this
HiseSnippet 1101.3ocsV0saaaCElJNpa1acaEX2z635U1.ZtRJww1qXnNwIovXKoFycAEnXnfQh1hHRjBRzIyXHug6YXOC6Mn6PRKK4TmrAiUAXIyy47Q9wCO+vwYh.ZdtHCYU+MKRoHquzdxBtLZXDgwQiNFY8U1mQxkzLrQzQKRI44zPjkUsWoDXUeWj94ue4QjXBOfVJBgtPvBn+LKgIKkNdvOwhiOkDReCKoh06OXTffOTDKlC7olsKJkDbEYF8bhxrcrQVO5jPlTjMQRjzbj0tGIBWLIRbC2X+Erb1kwT0.OzDXhLhOUDGpXrRJZXDKNbbw9NGAyx3RuPMiW3asOiExVIuza7MZE3RDU8GV6rN8psF87pRO2JzaCTxpBk10PomXOIHikJK0n3yWXOhCGNSIfauJUL1h14upYOT.VvksSHWQOMCFrBQyCbccvvqVunA34yk3qIY3wDNMF+i3BbjvPsnlOS+4YNX.jBRELoUrOHiBa+wDYTSkQO+4XEsvDNljkQVfugIiv74IWRyxwRANVPBwSt3UXVBbVm2HssRBvzjiIRRy244453412Ad62y4f9NGzyYOemNdNdcgwcc52aMcc7c786530oiRouOnqCHsiRmueGGe28c71qqRoA1d81fJXR64zGv6cu359wqVEEqQQO2dO.+6C58.8t+lxg0P6lamSkignN4uHlKYbZyoy4ARlf2bVqF+QCL7LSYiIcoo4Sdaky8v3zHRojHlj5fkQr71ynxKHwyoMageI1qsK9Gvts61BVUy7MExK0GboN32ANNr4G7xyUSNLtwsJNthhmIlmSGRhiuDRUK4H8ZHRnfmrolwsChYAWQCaokZzodfHjbx0TfhTHXBnGdJb3qGlnldrF2Jy06jPHzncHjYo2OPz2c1euXcyyKT7c2wt6ZXFMU4zKlfaMa2h8EVvOWHoul2Ts2p231F36pZ5zMpSkbjIhioYaTspPX1CAroIgww3fVYHTcX8RN12eImpUDCL4pULTvGwYxWmR42WcRzxDbU4okrBLUpKN83hhSp3BDCJA8Y1l+q4a0NBnecjJutXVfIDVjTZljo3u0wzqgNFlRd0sOllekTjpsMIUvUKuU8+s072A+fkZoVT7maXgxnUrXfXPDkMKpROovAPLr3lhHYfIes8gww3RAWNqnyT8G8zm9mePgRE1NhONiBwW.G2A8wksgFFhv4wD45cQTsNWp.NmWqzsp7LOmIWTs05+asV9uRwmXOlICh1LG2YCbDNP+TvwkMjer8ISmRCjkDbW6Se6mltuHSI2YmQjYLUrz4ySl.m7ATX04P.lJOCNrUP0icKBylP4g5Ae.dVpzSM1ZoRuBknDRPl38Al7HUK+OWKA3DWeam5v0tfwXuhLHaa21tnD31GuOHPs8+dHIcyX72BL6sEX1eKvzYKvbvVfo6Vfo2ChQcwuCmKEIlzAPv3SzUxrrNgSfHKcTH5e.6.fvf
-
@ulrik thanks but i only need it to fire when exactly inside the white see the way it fires even just off the white panel.
-
There was a thread a few weeks/months ago about hit box type detection with shapes drawn on panels. I can't find it now, but that's probably got the info you wan.
-
@ospfeigrp Here's some nice examples from @ustk
https://forum.hise.audio/topic/7986/how-to-detect-if-inside-ellipse/6?page=1
-
@ulrik That's the one I was thinking of
-
@ulrik Thank thats exactly what i am looking for here's the example
HiseSnippet 1061.3ocsV01ahaDDdMA2Vb6o1H0e.t4CsNRtHamP.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