Happy UI accident with button and knob On top of each other

Today, by mistake, i end up with a latch button, with 5 steps and a knob on top of each other. I forgot to delte the knob, when I was replacing it with the button.

And it actually looks really cool!

Both parameters are assigned to the same XXXX_PARAM.

That means it can both dragged, like a knob and pushed like a switch. If you drag it at the outher edge, you use the knob, if you push in the middle you use the switch.

Don’t know if this is a bad idea to do, but it looks and acts pretty cool.

Check the video!

Have a nice weekend :wink:

1 Like

pachde Imagine knobs are all intentionally pushbutton knobs, in one widget. Ctrl and shift combos affect the result of clicking the knob.

Yeah, I think it would be awesome to implement something like this, but in a proper manner. The one in the clip is made with a RoundBlackKnob and the VCVLightLatch. If you use the smaller knob, it’s hard to get a hold of it, it works better with the big knob.

@Vortico Check this out ^^^^^ :wink:

I am leaving it in this module for now to see if it causes any issues once I start adding presets on the module. But for now it doesn’t cause any issues.

Presets and such are parameter-driven, so it doesn’t matter what UI is sitting on top of the parameter.

I was more thinking about 2 parameters assigned to the same XXX_PARAM, not so much the UI side of it.

But since they are always set to same value, there shouldn’t be any issue, I think.

I did this by intention on 2 of my modules:

2 Likes

Cool :slight_smile:

I am keeping too, I think. Will try with the large knob, which I hope will make it easier to grab the knob and drag it. It’s a bit hard with the normal one and really hard with the small one.

By default, you can click a round button outside the circle as long as the mouse pointer stays inside the bounding rectangle. Usually this is not a problem, but when you put a button on top of a knob, the button’s onHover() and onButton() methods should only react when the mouse pointer stays inside the circle. See

for details how I did it.

2 Likes