12-11-2016, 08:21 PM | #1 |
Human being with feelings
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,629
|
gfx.showmenu() and nested submenu bug? (FIXED)
Hi all,
I am trying to construct a menu that looks like: Code:
- Toplevel 1 - Nested - Inner - Toplevel 2 Near as I can tell, Reaper doesn't support this kind of structure? I have tried the obvious: Code:
>Toplevel 1|>Nested|<<Inner|Toplevel 2 Code:
>Toplevel 1|>Nested|<Inner|<|Toplevel 2 I think this could be fixed easily enough: just have |<| semantically mean terminate a submenu. This would also allow this grammar, equivalent to the above, which is superior IMO as it's more friendly to programmatic generation of the menu string. Code:
>Toplevel 1|>Nested|Inner|<|<|Toplevel 2 Last edited by tack; 12-11-2016 at 08:32 PM. |
12-11-2016, 08:57 PM | #2 |
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 5,265
|
Use >< to make Nested the start of a submenu and the last one in its parent menu.
Code:
gfx.showmenu('>Toplevel 1|><Nested|<Inner|Toplevel 2')
__________________
🎁 Donate (PayPal) | Sponsor (GitHub) | The Endless Journey (Keyboard Ensemble) ReaPack, a package manager for REAPER | SWS 2.14 is now available in ReaPack [new!] Developer tools: Lua profiler | Interactive ReaScript | ReaPack Editor | ReaImGui |
12-11-2016, 08:57 PM | #3 |
Administrator
Join Date: Mar 2007
Location: NY
Posts: 16,501
|
We'll add this for 5.31, thanks.
gfx.showmenu(">first|>second|<third|<|first again") (this essentially amounts to making sure the last item in a submenu is not a separator) |
12-11-2016, 09:01 PM | #4 |
Human being with feelings
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,629
|
Thanks cfillion. Indeed this does work, but I hope what won't discourage schwa from adding the support anyway because the way I suggested is significantly easier to programmatically build the menu string.
|
12-11-2016, 09:02 PM | #5 | |
Human being with feelings
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,629
|
Quote:
Code:
gfx.showmenu(">first|>second|third||<|<|first again") Last edited by tack; 12-11-2016 at 09:08 PM. |
|
Thread Tools | |
Display Modes | |
|
|