On the off chance, is there an easy way to recall the context menu after an action has been executed.
lets say I have
void onAction(const event::Action &e) override {
if (module->normalMode) {
module->normalMode = false;
//callContextMenu();
} else {
module->normalMode = true;
//callContextMenu();
}
}
void appendContextMenu(Menu* menu) override {
....
modeItem->text = "Mode: ";
modeItem->rightText = module->normalMode ? "x✔ y" : "x y✔";
....
}
Effectively the context menu stay’s open when modeItem is pressed. Further down it closes normally when options are selected and become available associated with normalMode == false
variable y.
varY->disabled = module->normalMode;