You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice to support context menus for widgets. In v2.0 we have support for the ModuleWidget menu only.
Some of these menus are attached to knobs, buttons, etc, so the menu could go in that param's page (under the Mapping stuff perhaps?)
But some non-interactive widgets have menus, like the screen in SickoSampler. So we'd need to scan for menu items as widgets are added. Perhaps we allow anything with a menu to be selected on the module, and the side pane shows the menu if it has one.
The text was updated successfully, but these errors were encountered:
The createContextMenu() function calls the rack helper createMenu() which constructs a new rack::ui::Menu. In VCV this new menu is immediately added to the APP->scene at the cursor position.
So we would need to call onButton() or maybe some other variations (onDragEnd?) with the correct "right-click" event flags.
Then for
One issue is relating the widget to the element.
Proposal:
When parsing widgets on module registration, for each drawable_widget, add a DynamicGraphicDisplay element. Add the light_id of that element to the drawable_widget list (so it's a list of std::pair<Widget*, unsigned> or something).
In the ModuleView roller, show the Dyn elements
When clicking on one, do a dynamic cast to see if it's a rack plugin module. If so, get the ModuleWidget, and from that get the list of drawable widgets, and scan that for a matching light_id.
If found, add an LVGL button to the side pane which does a "Right-click" on the element. Not sure how to word it to indicate that this might not do anything..."Click element"?
For current API (dev-12)
When clicking that button, if it calls createMenu(), then the Menu constructor will be called. In Menu(), check a global state to see if we're in a element-view context (as opposed to creating the ModuleWidget menu). If so, then give the created Menu* to our GUI thread, which will take ownership.
For next API (dev-13)
Modify the createMenu() in helpers.hpp to register the new Menu* with our GUI context
Would be nice to support context menus for widgets. In v2.0 we have support for the ModuleWidget menu only.
Some of these menus are attached to knobs, buttons, etc, so the menu could go in that param's page (under the Mapping stuff perhaps?)
But some non-interactive widgets have menus, like the screen in SickoSampler. So we'd need to scan for menu items as widgets are added. Perhaps we allow anything with a menu to be selected on the module, and the side pane shows the menu if it has one.
The text was updated successfully, but these errors were encountered: