createEnterFloatText(text,ptr) menu item

I’m interested in coming up with some general purpose menu options to enter a float number in the context menu. I think I’ve seen this in some existing modules but I can’t remember which ones. I even found an old thread about the same topic but the link seems to be outdated.

So in short I’d like to have my

createEnterFloatText(text,ptr)
createEnterFloatSlider(text,ptr)

beside the already available API items:

createMenuLabel(text)
createMenuItem(text, rightText, disabled, rightIcon)
createCheckMenuItem(text, checked, disabled)
createBoolMenuItem(text, value, disabled)
createBoolPtrMenuItem(text, ptr, disabled)
createSubmenuItem(text, menu)
createIndexSubmenuItem(text, labels, getter, setter, disabled, alwaysConsume)
createIndexPtrSubmenuItem(text, labels, ptr)

Any hint or example would be appreciated!

The airwin selector menu has typeahead search across the collection.

That’s how I did it.

Not much different to implement the things you are talking about

1 Like

Thank you, the Airwindows search field is a good way to start for me.

Another example I found is Basically that has a nice title entry field in the menu. And I also see @dan.tilley used sliders in the Purferator menu but that source code is nowhere to be found.

Sorry, my plugin is closed source.

However, the Stoermelder Glue module has sliders in the context menu that you can crib from:

1 Like

For that matter VCV itself has sliders in the View menu.

Surge has sliders in the vco menu. Look at vco.cpp

1 Like

But the answer is “menu items are just widgets and you can do whatever you want in them”. Like the color selector for auto connect in surge aw etc

You can also look how Rack itself provides the floating point text entry for parameter knob right click menu.

1 Like