Receiving mouse clicks from panels
I'd like to have a coloured rectangular panel or button which can receive and report mouse clicks. I've looked at lcd and ubutton which are great but the problem is I want to deploy this panel in Mira and neither of these object can be put into a Mira frame (yet).
I can put a panel object into a Mira frame but I can't figure out how to get it to report mouse events. Is there any way to do that? If not, are there any panel-like objects I can use instead?
Robert
pictslider maybe ?
Maybe [hover] and some clever routing of [mousestate] clicks when over a panel?
Pedro -
That is indeed very clever. ;-)
Many thanks for that - it looks perfect.
Robert
This was solved in a previous topic. Look here: https://cycling74.com/forums/momentary-switch-for-mira/
My final solution uses a stack of objects to register mouse clicks as well as Mira touches.
Xanadu -
I did look at that thread when trying to solve my issue but it wasn't suitable for me as I don't want to use toggle switches in the mira.frame.
I like the solution posted by Pedro using hover and mousestate so will probably go down that route.
Robert
Unfortunately, the hover + mousestate approach isn't going to work with Mira because the iPad doesn't support the notion of hovering or mice. So apologies for framing my question poorly.
As it happens, there's a solution built in to Mira which is the mira.multitouch object and mira.mt.fingers.
Thanks for all the input, however.
Robert
I did find it somewhat strange, but I thought that you wanted to have some kind of control on the computer with the mouse and replicate that state on the iPad with a mira compatible object (panel, in this case).
Pedro -
Not to worry, your example was still very useful. I think that combination of hover and mousestate is very powerful.
Robert