Cabbage Logo
Back to Cabbage Site

Idea: mouse controls through image layer?

Got it, and it’s working! :star_struck: Doesn’t seem to be working on imported widget groups… but that might be something I’m doing wrong. I still need to play with it more.

No I’m pretty that’s my fault. I’ll take a look later.

It seems like widgets that are above a mouseinteraction(0) layer inherit it’s non-interactive capabilities. This screenshot shows popuptext for the “Depth” rslider. There’s a darkened image widget, and then a groupbox above it.

image

Can you create a minimal example for me? I’m not able to recreate this here, but I’m probably not doing it right. I simply created an image with mouseinteraction(0), then placed some widget on top of it. All works fine?

Sure, try this:

form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginid("def1")
rslider pos(50,50), size(50,50)
image pos(0,0) size(400,300), colour(255,255,255,100) mouseinteraction(0)
groupbox pos(30,30), size(200,200)

At around ~50pix if you mouse over you’ll see the popuptext show up. You can adjust the rslider setting normally if you’re in that right spot!

This ie because a groupbox never grabs mouse interactions. They always pass them through, which does seem a little inconsistent. Should I give them the same default behaviour as images now?

Very interesting, somehow I didn’t realize that was the case.

I do think it makes sense that groupbox should have the same functionality. I guess the question is what should the default behavior then be.

On one hand, technically, for backwards compatibility it should pass through. But that seems like unexpected behavior (at least to me), and I can’t help but wonder if anyone actually relies on a groupbox passing interaction through.

I don’t really have a dog in the race tho, so I’d be happy either way.

I can’t imagine anyone has ever purposely used this ‘feature’. I will add the option for groupboxes, but will set their default to match the current behaviour. At least this way it won’t break older instruments. And it will still give users the option to disable it.

1 Like