Deactivate a activated Button when a other one gets activated

treynterrio
Member Posts: 62 Newcomer
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
Back To Top
Categories
- All Categories
- 21 Welcome
- 833 Hangout
- 77 NI News
- 403 Tech Talks
- 1.8K Native Access
- 8.4K Komplete
- 1.1K Komplete General
- 2.1K Komplete Kontrol
- 3K Kontakt
- 712 Reaktor
- 246 Battery 4
- 481 Guitar Rig & FX
- 282 Massive X & Synths
- 497 Other Software & Hardware
- 3.4K Maschine
- 23 Sampling Room
- 4.2K Traktor
- 3.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