Deactivate a activated Button when a other one gets activated
treynterrio
Member Posts: 64 Member
Hi, when for example Button 2 is activated and I activate Button 5 the second one should be deactivated and so on.
is there another way to do this? because since I'm using this code I've many problems with the functions of my script.
on init declare $i declare ui_button $button0 declare ui_button $button1 declare ui_button $button2 declare ui_button $button3 declare ui_button $button4 declare %buttonIds[5] := (get_ui_id($button0), get_ui_id($button1), get_ui_id($button2), get_ui_id($button3), get_ui_id($button4)) declare const $buttonIds__SIZE := 5 end on on ui_control($button0) $i := 0 while ($i<num_elements(%buttonIds)) set_control_par(%buttonIds[$i],$CONTROL_PAR_VALUE,0) inc($i) end while $button0 := 1 end on on ui_control($button1) $i := 0 while ($i<num_elements(%buttonIds)) set_control_par(%buttonIds[$i],$CONTROL_PAR_VALUE,0) inc($i) end while $button1 := 1 end on on ui_control($button2) ........
Tagged:
0
Comments
-
What type of problems are you experiencing ?
This code written just above seems to be suitable.
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.5K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 378 Battery 4
- 845 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