Multi Group Purge With Menu
Comments
-
You can’t use the purge code within a function. You’ll need a different trick for that but you’d simply use your purge code inside your menu callbacks (including previous and next buttons).
Check this old post for more info on next/prev menu buttons: click here0 -
Thanks. I did add the code as you said. It works but now the menu only cycles 1-20 and not 1-40 using the Prev + Next buttons.
The link to the old post didn't work. I'll have a search.
0 -
I don't know why the link wasn't attached.
Anyway, here's a quick example of what you're looking for:
on init
declare ui_menu $my_menu
make_persistent($my_menu)
declare $i
$i := 0
while ($i<10)
add_menu_item($my_menu,$i+1,$i)
inc($i)
end while
declare ui_button $prev
declare ui_button $next
end on on ui_control($next)
if ($my_menu<(10-1))
set_control_par(get_ui_id($my_menu),$CONTROL_PAR_VALUE,$my_menu+1)
end if
set_control_par(get_ui_id($next),$CONTROL_PAR_VALUE,0)
end on on ui_control($prev)
if ($my_menu>0)
set_control_par(get_ui_id($my_menu),$CONTROL_PAR_VALUE,$my_menu-1)
end if
set_control_par(get_ui_id($prev),$CONTROL_PAR_VALUE,0)
end on0 -
Thanks a lot. I did post yesterday to say I had found the answer. Not sure why it hasn't added to the discussion. Maybe my PC had a moment.
I'm all sorted now thanks to you folks.
0
This discussion has been closed.
Back To Top
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 62 NI News
- 785 Tech Talks
- 4.1K Native Access
- 16.6K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 380 Battery 4
- 846 Guitar Rig & FX
- 429 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.8K Maschine
- 7.3K Traktor
- 7.3K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators