How to click a label, or area of UI, to select group?

I want to be able to place some things on the UI, and by clicking on one a specific group gets selected to be able to sound. The simplest way to get started I think is to just use labels.
I haven't been able to find and or understand a way to do this, but I know it is done.
Help! :)
Thanks.
Comments
-
Anyone?
Dragon?
;)
0 -
A switch or button would be more appropriate for this action.
0 -
OK. I'll look into that and see if it will work. Thanks.
Is there a way to make a switch background hidden, so that only the text is displayed? I can't find anything for that.
0 -
Well, I am not finding anything that works as I need it to. The button and switch work, but I need any that are currently 'pressed' to become not pressed when another one is pressed. How can I achieve that? I don't see any control parameters related to the switch state.
0 -
You have to work and master the if ...else ....end if function _
0 -
Yes, I already know that logic. If then else WHAT?
0 -
to switch a switch off when other is pressed
on ui_control (switch_2) if(switch_2 = 1) switch_1 := 0 end if end on
0 -
Please read what you posted "...and by clicking on one a specific group gets selected to be able to sound. The simplest way to get started I think is to just use labels."
It is hard to understand what you want. I will guess:
You want a number of buttons on the UI and when any of them are pressed, all the others will be turned off (not pressed) and that pressed button will point to the group you want to play.
If that's what you want:
on init declare ui_button $button1 declare ui_button $button2 declare ui_button $button3 declare ui_button $button4 declare %button_uiids[4] %button_uiids[0] := get_ui_id($button1) %button_uiids[1] := get_ui_id($button2) %button_uiids[2] := get_ui_id($button3) %button_uiids[3] := get_ui_id($button4) declare $i declare $group_to_allow end on function clear_buttons $i := 0 while($i < num_elements(%button_uiids)) set_control_par(%button_uiids[$i], $CONTROL_PAR_VALUE, 0) inc($i) end while end function on ui_control ($button1) call clear_buttons $button1 := 1 end on on ui_control ($button2) call clear_buttons $button2 := 1 end on on ui_control ($button3) call clear_buttons $button3 := 1 end on on ui_control ($button4) call clear_buttons $button4 := 1 end on on note disallow_group($ALL_GROUPS) $i := 0 while ($i < num_elements(%button_uiids)) if ( get_control_par(%button_uiids[$i],$CONTROL_PAR_VALUE) = 1) $group_to_allow := $i end if inc($i) end while allow_group($group_to_allow) end on
good ol' vanilla KSP.
0 -
Thanks for that. I'll give it a go soon.
I actually decided to just make it so that any sound which had the switch on would play, so multiples can play at once. But what you posted will surely be useful.
Thanks!
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 63 NI News
- 795 Tech Talks
- 4.1K Native Access
- 16.7K Komplete
- 2K Komplete General
- 4.4K Komplete Kontrol
- 5.8K Kontakt
- 1.6K Reaktor
- 385 Battery 4
- 853 Guitar Rig & FX
- 431 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.8K Maschine
- 7.4K Traktor
- 7.4K 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