Custom Floating Menu: flexibility with "Close after button press" settings

When setting up a Custom Floating Menu, the "close after button press" is something set at the level of the floating menu itself, not on a per-button basis.

1.
It would really increase the flexibility to allow individual buttons/items an override option so that the floating menu will either close or not close after button press.

For example – I have my main Custom Floating Menu set to close after button press, but there are a few functions for which I'd really like the Menu to not close, such as a button which you want to hit repeatedly a number of times (eg. incrementally change volume/etc, nudge commands etc.)

I would imaging the implementation of this to be along the lines of a selectable option when editing a menu item with 3 options:
-Default to menu setting
-Always close menu after pressing this button (regardless of menu setting)
-Never close menu after pressing this button (regardless of menu setting)

2.
A separate but related feature suggestion is to have the menu-level setting of "close after button press" something that itself can be toggled when using the menu. That is, you can create a button with the behaviour/action of toggling the "close after button press" setting for the menu.

Thanks.

+1 to the request number 1

You can achieve that quite easily by adding the "Hide Floating Menu" action to your action sequence for all buttons where you want to close the menu:

1 Like

Thanks! Of course that's so simple, don't know why I didn't think of that.

Is feature (2) possible, maybe with a script? To be able to alter the menu settings with a menu item?

It should be, however I haven't tested this exact use case yet.

The script (run via "Run Real Java Script" action) to disable close on click would be

(async ()=> {
   const updateDescription = {"BTTMenuCloseAfterAction": 1};
   await update_menu_item({"item_uuid": "4FAAE4F8-5858-4444-A0E4-3498B7534CF2", "json": JSON.stringify(updateDescription), "persist": true})
   returnToBTT('done');
})()

To not close:

(async ()=> {
   const updateDescription = {"BTTMenuCloseAfterAction": 0};
   await update_menu_item({"item_uuid": "4FAAE4F8-5858-4444-A0E4-3498B7534CF2", "json": JSON.stringify(updateDescription), "persist": true})
   returnToBTT('done');
})()

You would need to replace the UUID with the UUID of your menu (you can get it by right-clicking the menu in the BTT UI)

1 Like

Wow thanks a lot! I've never tried using the scripting side, a bit scared of it. I'll give it a try.