Multiple Load/Save Buttons
Andrew Finch
Member Posts: 17 Newcomer
Hi all,
I am working on a project that requires multiple (separate) load/save buttons for different controls on a GUI. So far I have worked this out:
on init declare $count declare ui_button $Load declare ui_button $Savea declare %preset[2] declare const $MAIN_PAGE := 2 declare %main_view_id[$MAIN_PAGE] declare $load_arr_id $load_arr_id := -1 declare $save_arr_id $save_arr_id := -1 declare ui_slider $knob (0,1000000) declare ui_slider $knob2 (0,1000000) make_persistent ($knob) end on on ui_control ($knob) %preset[0] := $knob end on on ui_control ($knob2) %preset[1] := $knob2 end on on ui_control ($Load) $load_arr_id := load_array(%preset,0) end on on ui_control ($Save) $save_arr_id := save_array(%preset,0) end on on async_complete if ($NI_ASYNC_ID = $load_arr_id) $load_arr_id := -1 $Load := 0 if ($NI_ASYNC_EXIT_STATUS = 1) $knob := %preset[0] $knob2 := %preset[1] end if end if if ($NI_ASYNC_ID = $save_arr_id) $save_arr_id := -1 $Save := 0 end if end on
At the moment this creates a load and save button for two sliders but I essentially want to incorporate another set of load/save buttons to independently load/save two more sliders, how do I go about adding this into the code I have worked out so far? Thanks in advance!
0
Comments
-
Should use multiple async ID variables then.
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