How can I consolidate a bunch of similar ui_control callbacks?
Alcot60890
Member Posts: 17 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
- 19 Welcome
- 1.4K Hangout
- 60 NI News
- 735 Tech Talks
- 3.9K Native Access
- 15.9K Komplete
- 1.9K Komplete General
- 4.1K Komplete Kontrol
- 5.5K Kontakt
- 1.5K Reaktor
- 364 Battery 4
- 817 Guitar Rig & FX
- 416 Massive X & Synths
- 1.2K Other Software & Hardware
- 5.5K Maschine
- 7K Traktor
- 7K 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