How can I consolidate a bunch of similar ui_control callbacks?

Alcot60890
Member Posts: 18 Member
on ui_control($options_001) $GroupPage := 1 hide_part($VolSlider_001,$HIDE_PART_NOTHING) hide_part($VolSlider_002,$HIDE_WHOLE_CONTROL) hide_part($VolSlider_003,$HIDE_WHOLE_CONTROL) hide_part($VolSlider_004,$HIDE_WHOLE_CONTROL) end on on ui_control($options_002) $GroupPage :=2 hide_part($VolSlider_001,$HIDE_WHOLE_CONTROL) hide_part($VolSlider_002,$HIDE_PART_NOTHING) hide_part($VolSlider_003,$HIDE_WHOLE_CONTROL) hide_part($VolSlider_004,$HIDE_WHOLE_CONTROL) end on on ui_control($options_003) $GroupPage :=3 hide_part($VolSlider_001,$HIDE_WHOLE_CONTROL) hide_part($VolSlider_002,$HIDE_WHOLE_CONTROL) hide_part($VolSlider_003,$HIDE_PART_NOTHING) hide_part($VolSlider_004,$HIDE_WHOLE_CONTROL) end on on ui_control($options_004) $GroupPage :=4 hide_part($VolSlider_001,$HIDE_WHOLE_CONTROL) hide_part($VolSlider_002,$HIDE_WHOLE_CONTROL) hide_part($VolSlider_003,$HIDE_PART_NOTHING) hide_part($VolSlider_004,$HIDE_WHOLE_CONTROL) end on
Hi, I have a many enumerated ui_control
callbacks formatted like this example, which I'd like to consolidate as much as possible. How might I approach this? I would expect I could use a While
loop and get_ui_id
to increment the IDs of the widgets, but I can't seem to make that work in the callback or the hide_part
. Thanks in advance for any advice or examples. :)
0
Comments
-
use a function
1 -
among other things, that's what functions are for
1 -
Thank you both. I'll get myself familiar with functions then. :)
0
This discussion has been closed.
Back To Top
Categories
- All Categories
- 18 Welcome
- 1.6K Hangout
- 66 NI News
- 863 Tech Talks
- 4.4K Native Access
- 17.7K Komplete
- 2.1K Komplete General
- 4.7K Komplete Kontrol
- 6.1K Kontakt
- 1.6K Reaktor
- 399 Battery 4
- 896 Guitar Rig & FX
- 456 Massive X & Synths
- 1.4K Other Software & Hardware
- 6.2K Maschine
- 7.9K Traktor
- 7.9K 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