detect hover over irregular shapes
Hi all, I want to split a ring up into 12 sections and then detect which section is being hovered over with the mouse. Is there any way of detecting a mouse hover over any other shape except a rectangle?
Many thanks
p.s I don't want to use [ubutton] as this is effectively still a rectangle.
jit.window or patcher?
Thanks for the reply, not sure how [patcher] would help? jit.window will help me draw irregular shapes, and I know it reports "mouseidelout" but not sure how to report on the presence of a mouse over that irregular shape?
Maybe you could create a "clickmap" type image and load it into a jit.matrix the same size as your patcher. Getcell at the same coords will give you a particular colour output
-A
like this?
WOW! That is utterly awesome, thank you! I know this is cheeky, but would it be possible for you to add a few notes to the patch to help me understand some of the math? I really am so grateful for this!
The torus is just making the location visible.
Yes, that sort of idea. Nice one.
I was thinking that you would not see the "map" image, it could be a custom graphic created the same size as the ui in your patcher, the patcher could refer to it to get color or something based on the position of the mouse in the patcher.
-A
hi,
May be "jit.gl.picker" can do the job ?
Perhaps some similar options here: