Panel switching defaults
-
I made 4 panels and I switch them with one button. Not perfect, but for now it will be sufficient.
The problem is that it does not start the first panel when project is loaded. It also complains about the placeholder.png not being found.Here is how I did it:
const var panels = [];
for (i = 1; i < 5; i++) {
panels[i-1] = Content.getComponent("Panel"+i);
panels[i-1].showControl(false);
}var currentPanel = -1;
inline function onLayersControl(component, value)
{
if (value == 1) {
if (currentPanel > -1) panels[currentPanel].showControl(false); //Hide previous panel
currentPanel = (currentPanel + 1) % panels.length; //Move to next index
panels[currentPanel].showControl(true); //Show panel
}
};Content.getComponent("Layers").setControlCallback(onLayersControl);
-
Make a simple snippet that demonstrates the issue.
-
HiseSnippet 13862.3oc6808ibickeUKIpOZ8UKMxerqWufQXbVMd7no3kr9JNdlp+Tpyzs5Vc2RiEbrsXWE6toEKxZHY0R83cxL1diiwFj0AAHOrODjAvHaVrOrH.YwhjGVj9Of8AC3EA4wI.AKVf7xj8w8Emy8xut7qptjUwVcIyd.FU7Rdu7bO2y8bN2y876xMMM5nXYYXVYlKsyQ8UpLyU319Hc6CV7.YU8JqtTkYNO2NKu8NUV3n9xVVJcqLyLm8d36MykNWExee96tfrlrdGkfhpT4wFpcTVSsmpcPoa198T0zVQtqxNp8ndZo1q1wPeQCMiA.cbVtpU5K24Yx6q7.Y7icFNfHVtqpsg411x1JVUl4bKXz8nsOv345NO+iUsT2USAegPksgFxo3ULz5hoXboUV7.Usta50espTYFtMC58m0o2eKt0U6p5Wd.WXNxM3CpAM+XlyDl7NaHxSfl7pRQdIPRmkhjNmCIcCts6Xp12N3NX54xbqpaqXtmLv1oIEmmsxY9a9JbKZ.Ogt8c6I+LkULgK7qwcDpVs52fugP023aN6rp5czFzU4N2dqCj6aAT9BFpZJl80fNya6dSq2d4WzWV2R0P25t+.qaC0ispslgwylWu6JJJZYpdaJaeP1dS2WADrLyTUVwvvNiUYSSEKE6rQYOxRwbaEaaU88yVE2tuptdV6SPYap14Y9Ua129s4k3gAOEMK9NGHquOPGyN6rvTNKa9CkM8t22h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Jydjrm8HWfa402bmmTlmHiUdhHwVdhb6ie4mmHRkefZJOkQXIOQj9MrSYDoo97DoLtkkwsrLtkk4IxIedhHUlmHk4IxTVdhHUlmHuJlmHRuJmmHRk4IBa4IhTYdhbZOOQjJySjx0aUtdqx0ac5LOQjJySjx7D423ySDoxOPMk4IRYdhTlmHk4Ixok7D4jfJOIdG8j6XZ7863DvKL+3hjR.NgtLILKbqiulWvaCZ43pd2pU5o1U862oCNdCukPkJIWGTNpiXNpiTNpSsbTm54nNMxQcZNz5fCq57CrM54n8DDGoBx5LWl9BtYtP346WlCO40bOYvY.x6ZU8tJuvSXvQSDE31WVOjGzqLPSK1yfKLxys8yTdN95+8+N23M9l++tbax6D5R3x9g25O+d+u+v+.7h+MU2cfMYQ.qr5Z7K04HApf9MyYqLjt0rStt0SZyV25Is85VzQ.YHcqqw0WWCS1fBUbbwn6Zqu4xN5alweKPfR++C7zfsjJ
-
@alfaholic That snippet requires some stuff that I don't have like your sample maps and a different version of the Rhapsody boilerplate. Please make a simple snippet that contains only what is needed to demonstrate the problem you want to solve.
-
@d-healey Ah, sorry. Here it is:
HiseSnippet 1049.3ocsV0saaTDEdFmrgZCshJwCvnHgjsRiqca5ORgRMwIFLTmZgaq.UUUMY2Y8NJ6NypYmMMVnH0K4RtDItgGBfq3AgmBDuAvY1YW60oVNIFvWjrme+9lyLm4LCURWVRhTgvUe1jXFB+ANilHzAcCnbAp+9H7MbFPSzLEwpZuIwzjDlGBiW6yMJvUWGk86ud7dzPpvkMSEB8BI2k8DdDWOS6vNeEOLrG0i8LdTIu2oSeWonqLTlB7YMmVnXp6wzwrCoF2p3fvabfGWKUizTMKA7YOo2jQAx2Hr9+BdB+nPlQnMZDjHqZT2.dn2vh0ZBBgWe3rU9Z1U9G4Lf6wmpeVE3CyLPlEQ4Z.txxnT6q.kvknz5VJcSmQtJdrdlECedem9BXCwmBk5xTw5KpxeVwoqD7PnaFQOl0SABSin98a05VD3OM1sVsZP8NQSNgpHwTAKLg7HxKeEXvWpH04fT6cIbxmPtG7us1pA46pQfeVeeIe61uBbo.qwLcWYTrT.B02bnwmM2hCvbtPZl.UGSPJYXceZXBC74rLupUyPE2TkBxQVFf7ucafPbQHWvH9oBWMWJHRwSnSXpjh73Vf7sfUSXJqQMKU49j5YJHOBVLEKfBKygzmBH0nfnksrPFSt8s+BtGiDqXmvkoI1.ml8ysFlGosLL4iygpYHSLVGXR3.4ILhVRDrS0Dtvic5z7cgzRqRsrxb1qDYNq1YP4aw6Q1R3lMZlXTmkmtzvviftt5mq.2X2Rk9CkZ1SE0M03plctyax2eg1xSUHSsPylKCTKKv5hzniXpR6vYNBcKy2BtwkqEz0VSJ4nTzWv0OMlkK2SF5YZsLe+tMrn7hpo0Mmgfq5rF2aj23tWpVKEHNjjq4XKnnL1W9NRzy6uOUSKxiY+UIiYJM2rZv6CGvbY1KDp5rOK4XsLFgcltQB41h50Kttvr6mCZ12sQmBAf+M.qIlOBfOdC2SGXD9ALBEv3iCzFouDj3ZVTw0vU2nWuepkgkmTTFwqgtBXeGK1+RA1dWEr+0e+4+av9tFryKzu0uyjYU8usyklC+H5wKiCu2Evgc9ufCe+1+bFGJCryEeTqDxiJg7e71N7jAxHHMTEnFWA8tydfodRuzPpd9QglY94Ffly4l+XlwHR35IkeSvUX9XqkNe7xRwa5LjqcCVLGqr.NB8c+evw7WUbcmC78Yt5YDbcmdeyp9DhK.9uVlp4hwCnZE2z0cXZzH3DjKCPWXFfXNcUwbLxJ2xHap.iXBuLg+F9karsQFmarcgQTD0UIesq8BOy6VtVlFfShrmoUEduHHSZWbQmiSqlsPQvSndsqqY4uMba5hi4NqPL2cEhYmUHl6sBwb+UHlGrBw7vkFi40qeVpVFYaG.ECOHafCFeffBmrxNEh9G.cXCgC
-
@alfaholic The problem is
if (value == 1)
The button will never be 1 until it's clicked because it's a momentary button.You have two solutions:
-
You can change the if statement to only work when the button is off.
-
You can initialise
currentPanel
as 0 and move it above the loop. And in your loop change this line
panels[i-1].showControl(false);
to
panels[i-1].showControl((i - 1) == currentPanel);
-
-
@d-healey Works great, thanks!