best practice for adding clickability to non-clickable objects?

Mar 17, 2012 at 11:17pm

best practice for adding clickability to non-clickable objects?

Sometimes I want to be able to click an object that is not usually clickable – e.g. a panel.

One way I’ve thought about doing this is placing a clickable object like a button on top of the panel, but making the button transparent. Then when I click the panel, the invisible button will send a bang.

Does anyone have any better ideas?

#62077
Mar 17, 2012 at 11:24pm

there’s an object made especially for that, its called “ubutton”
it has a few more parameters to choose from (position of click, mouse up, mouse down, etc)

#224217
Mar 17, 2012 at 11:28pm

nice, thanks Ploki :)

#224218
Mar 18, 2012 at 1:13am

In max 5 an up there’s also [hover], so you could scripting-name various objects (though not all will work with [hover] as I recall) and sense when the mouse is over them. Then you can use [mousestate] to sense the click. Might be helpful too, and you have the advantage of getting a message before the click, if you want that.

#224219
Mar 18, 2012 at 2:41am

[ubutton] works fine in the foreground, [lcd] can do the same and more and works when behind the visible object.

-110

#224220
Mar 19, 2012 at 6:58am

what do you mean by ‘non-clickable’ ? could you post an example ?

#224221
Mar 19, 2012 at 10:35am

what do you mean by ‘non-clickable’ ?

it’s an object that does not produce any output or change its state in any way when the patcher is locked; ie cellblock, button etc are ‘clickable’, because they respond to a mouse click in some way.

#224222
Mar 19, 2012 at 11:01am

Yes Terry, that’s exactly what I meant by ‘non-clickable’.

Thanks for the other suggestions too.

#224223

You must be logged in to reply to this topic.