Deactivate a activated Button when a other one gets activated
Options
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
Back To Top
Categories
- All Categories
- 18 Welcome
- 989 Hangout
- 56 NI News
- 493 Tech Talks
- 2.6K Native Access
- 11.9K Komplete
- 1.4K Komplete General
- 3K Komplete Kontrol
- 4K Kontakt
- 1.3K Reaktor
- 307 Battery 4
- 638 Guitar Rig & FX
- 330 Massive X & Synths
- 798 Other Software & Hardware
- 4.2K Maschine
- 4.9K Traktor
- 4.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