Saving panel selection in preset ?
-
I am currently using two methods to switch between panels on the GUI.
Neither of them is saved in the preset and in both when recalling a preset it will reset the panel selection to initial.
To be clear , the content inside the panels saves fine , but I want to save in the preset which panel is in use.Its 3 buttons , 3 panels , the button state is saved but does not switch the panels when I recall a preset, I would assume the button would send its current state when recalled with a preset ?
Here is the one I would prefer to use , can anyone tell me why its not saved in preset ?
I am starting to think its not possible to save which panel should be open in a preset , which would kind of ruin my plugin concept ... hopefully I am wrong?
HiseSnippet 1486.3ocsX0saaTDEd2jrowtXZqT49QQHvQsjZmzVPDppqc9AqRRsvosHJk1w6N1dTWOiY1YSiUUjh3E.dD3I.IdC588Fti6Q7.TwEHj3hvY1cVuylXm3ZorW4y+emyblyLiaH3tjf.tvxN2tC5SrreOmlCXxt05hoLq5qaYufSCAIfHspNnONHf3YYaO6VJo14lyJ56s2sJ1GybIorrrdDm5R9JZOpLkaiJ2m56uI1irKsmg12rRcWNqF2mGBHYVmRV8wtu.2grCVo1LNV1yugGUxEMkXIIvxdtpbuAM6xeIKV+GQCns7IJhxVMAGEydStumBwJtV05R88ZjjwAVfWZjl+yFm+W0YapGcH+z5vkiDfRsvrdXOyoAuxlvqzjCOaC3MWL7thSSWAsuLUhBaWzoNSRDswvRfIrh00Zl+YVmZbPClb4d3WP1T.DCsn3sKU55naUpzRqUHeg7vBQfDsGVf14ga+rF2aqMZhtCZ00P23F61kfXg8ZQDHdaTeX8I.MfGh5h2inLEzfiBfx.ADxH9AHLyC0JTJAeZ5Ysz6fdxSWyjuV0DAJOtEQhjcy3PUfS8Zat.UjBlTZMDE8EonFHu10VpP9WUHOB9hcvSnOETMoXzgHqw60my.hhK1PowhWippCJKzg3zLokj0.PyHMZ4.kpLof6WC662B5nKp0uV0kT0y6EDP6vPtZon1gLWIkyPRt1O4OHtJzHMkOo5ExSY9TFI09ggonaL.tNTd8CIoUizBKk4Q1WsdpHzgfxLnfhtPfGfJFuLzQaxRwNxmC3Q6j6jXwxQzOncR3SJNIw9KodDDj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8ndzm45pJEeBf8QayJSgMqNE1byovlaME1b6ovlOcJr4yNUaT+0O2KTx6EuMAXzXi3YW1avvPWVTGo0+CWbMJ9B
-
It's a logic issue.
Console.print(index);
is your friend. -
@d-healey Yes, that shows me the index of the button that is pushed.
And I can see what it does onInit , and on preset load ...it goes through the indexes and to a certain index.
So I know why it does not work .Just wondering if its possible to make it work ?
-
Of course! Didn't I include it in the tutorial?
HiseSnippet 1496.3ocsX0saaTDEd2zrowawzVox8ihPHG0RvNosfHTUW67CVkjZgSK+TJMi2cr8ntdFyriSiUUP4M.dD3I.IdC58bC2w87DzK4tvY1cVuy5eRcrnVJQdN+9cNyYNybbcA2iDFxEV14NXPOhk864zX.S1oZGLkYUaKK6kcpKHgDoUkA8vggDeKa6KsqhqctEsh97l6WAGfYdjTRVVOgS8HeEsKUlRsd4GRCB1A6SNf10P5aWtlGmUkGv6CH4RNEs5g8dAtMYerRrEbrrWZaepjKZHwRRnk8hU39CZzg+RVr7OgFRaFPTKJY0.LTL4c3A9JDqnZUsCMvudRDGZAVodZ7eo33+FN6Q8oComlGtVDCTpFl4C6ENO3UxDdEmc3Ya.uEig20cZ3In8jobTX6JN0XRhnEF1BLgUrrVKrwhNU4fDL4Zcwufri.VLTiB2sXwagtSwhqtYd27tvFQnDcDVf1+w6875OX2saftGZiMQexmbPGBh0uaSh.wag5A6OgnA79nN3iHJUAI3nPHMP.lLRPHBy7QM6KkfMMsrl68PO8YaZRWKZBCkE2kHQxNYLnxwoVsEWfJPAUJtIhh9hTTCKu4MWMu6qx6hfOwF3ozmAhljLZSjU4c6wYvhBqTWIwJ2jpxCJMzt37ToojUGPyDUZsPknLofGTEGDzDpnKnkuZkUU4yGDFRayPdZtnV8YdRJmgjbscbOINKTOMjGW77tTV.kQR0enaJ3ECfaAo2f9jzrQZhkx7IGq1OUKztfxLVAIcg.O.UHdansVkUiMT.Gvi1H2KQi0hV+nVItOI4D+eZKTgD3nVqgTLr9RpOAAQXb4UJm251bhfFVKy19Zgv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Iqy5ygNaLG5b64Pm6LG5b24PmOcNz4yNWcT+5ROnuj2M9XBPn91w8tr2lggprnJRq+Cj5O0vC
-
Let me check my files , it does not work for the downloaded files for the tutorial.
So the if (value) was all that was needed :) heheh
-
@lalalandsynth Yup
-
@d-healey Ah ok,I can see what happened , the if(value) gets removed when you show the all panels hidden thing in the tutorial.I just assumed it would work like that , sry !
Thanks mate !