detect hover over irregular shapes

    Jan 27 2014 | 8:27 am
    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

    • Jan 27 2014 | 8:29 am
      p.s I don't want to use [ubutton] as this is effectively still a rectangle.
    • Jan 27 2014 | 9:58 am
      jit.window or patcher?
    • Jan 27 2014 | 4:43 pm
      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?
    • Jan 27 2014 | 7:09 pm
      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
    • Jan 27 2014 | 9:00 pm
      like this?
    • Jan 27 2014 | 9:33 pm
      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!
    • Jan 27 2014 | 11:58 pm
      The torus is just making the location visible.
    • Jan 28 2014 | 1:37 am
      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.
    • Jan 28 2014 | 8:21 am
      hi, May be "" can do the job ?
    • Jan 28 2014 | 9:20 am
      Perhaps some similar options here: