Help me to make an Auto scrolling Name/Credits with Panel But Loopable
-
How can I make an Auto scrolling Name Credits with Panel but Loopable ?
I have done it so far..
const var Panel1 = Content.getComponent("Panel1"); var yOffset = 0; const var names = ["D. Healey", "iamlamprey", "DJ iran", "Iran ac", "dustbro", "Christoph Hart", "ulrik", "Orange", "Entire HISE Family"]; Panel1.setPaintRoutine(function(g) { g.setColour(Colours.lightgrey); g.drawRoundedRectangle([0, 0, this.getWidth(), this.getHeight()], 6.0, 2.0); g.setFont("Arial", 14.0); for (n=0; n<names.length; n++) g.drawAlignedText(names[n], [0, (this.getHeight() / names.length * n) + yOffset, this.getWidth(), 20], "centred"); }); const var textTimer = Engine.createTimerObject(); textTimer.setTimerCallback(function() { yOffset -= 1; Panel1.repaint(); }); textTimer.startTimer(100);
But the problem is it is scrolling only Once.
-
I have used For Loop
textTimer.setTimerCallback(function() { for(var index = 0; index < -5; index++) { yOffset(index) -= -1; Panel1.repaint(); } }); textTimer.startTimer(100);
But it is not Scrolling any more.
-
Bump Bump..... Where is our power user @d-healey ?
-
@DabDab Actually I gave it a go the day you posted it and I couldn't figure it out :) If I find some more time to spend on it I'll try again
-
@DabDab you could decide how many times you want it to loop, like this, I've set it to 4 times here
HiseSnippet 1075.3ocsVstaaaCElJIpn1acXEXO.DFX.xKtd1YYcEnqXNwWV7VSrQcV6FBJJnknkXCEo.EUSMF5K190dj1av1ghVVxMAosFXx.V7bke7biZpR5SSSkJjSsyWlPQNet6rkBcT+HBSfFO.47EtmRR0TE1x53kIjzTZ.xwY2e1vvo1dn7m+4mNlvIBeZIKD54RlO8orXltj6zd+JiyGQBnmyhqn8g8F6KE8kbYFfmcc6fRH9WRBomQLpsiKx4NCCXZoZllnoofNGKCVNKRdkvp+yYor4bpgnKZF3HKaT+HFOXZwYMEgb1aZ4IeW6I+qbOkEvVyuLB7k4BvkVTMF3rysAoteBPxoBj1yBo66NyWwRzkRL34ybGKfDxBBDpqBEqtnc9qcc6KAMD51wjKoiT.wZK7dXmNsvveMeb85P3NUieCQgmRDTdW7SvEVFR08kwIRAP30vJtgwFEMDubxhEoTMndm0dQ.IoTfyEMFzFeBkvoKazB2fQh4j3DkkZvufYJhvrbL7FS7MKCxR0yURyx9QJVpVlDgOgnzFNYbE6RyhIfAgTypgBMSQwmLd1P7HRLim66GfW8qwKebNJ0P0UJWJSnA.tNDPp8XzFf9TH4pelLSyDTuEYBeMSJ7BaV+OqigmPiN1JQO6qz1bVXjNDNHPTvpSfhbE3CQ.M3YTeM.ON0SGwRMQumJ8I7iMRS85zDB4sg39As6r1ZXGFIMA2iTLBGNAcObszERE1SjGewB7OZCts4TQnNB+MUOYf782uYtQkf5H.qBZv4z2p8xM8BA9q2vIurE9B.OqQ6ITyoyqI9ae+8RzDueQBuEtP+WvBzQdvw5fNfqZ3CUIJZfo.4ckEVZX+Ms3J3fLTDBg519JJzmjybx7WCAMOi50WqoIpjunOgymCs+kImhbSQw2CdBtqMZsJspnIlrpWAHp3TMTLkuzqqoxuvmXo3LolNw57Z0eWc76KZwhaTloMQI4bvi2jX6dcKF5IxhmSUsflOdFcshPm+liStyG23DeaWaEEkhwBldRBcE8HIOvLlvr95CePqZ6gU+13ADMwLOZEOPuDpRyLvwY.8Mv.c6zoZtCnoWBMq45tZVA.Yctz6UL6xjbPLXquqqMQgda4L++n2xpDWYJqJYrrWTdc4ZN+spG55iIgAzxfLNQu4Tay0SqD.w9MFUZFGJRY5kUu95SXTdmacT9GKDuu6Tl1O5lw3N2.Fgrx+GXb0Ef2yc3hEPKYI.2yczuus218A1d6r2vSIZECpGbOKKdFLl0mB6t.pR.m65rioxzR2wPah.ynhfbh+EdVIrqg1YkvtEBQwDek7U91NNyUr2MmCfIQ9WTTC9zFfF2Ek2EVMNGC23+Je+Mc00L7fs0vuaaM7vs0vueaM7gaqg+v1Z3i9vFZ9frixzxXaaCBc5zg4isbbFJHPEXd0J5+.+azDRA
-
@DabDab Something like this (I added the button as I was tracking the numbers in console and they were getting on my tits if there was no way to stop the timer
)
Hise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1Dl6AOnZhZlfNOnJP3bSL6kRxWPJt..5w.0cNL+PxU7irJ4AYrrEjVZT+UyxeyPBefaF2jryNKH6bex5aTEYnQrXMPahIxwi5yhHwreaLC9rBQqH.SEJwiYDgRENcsKky5qa73kl8M4DabKF90lHPmVx.fljdbSxjmz+MPAGOoo7TEwBQxKMgsL8gODkyqxnUYtc8cHML9MkQFwBQBoaZ7CGvEqDrZgQ3joVks2lKE.ZxO1RIS2siGKBez00K6bz0fHQLlkbfFjNMCHE.Ll1Rd0cCjwT5cdX.dnHr..cL6zkAvWjyOzd.UDyfi6pmvKmdBD70rLfoi.+uMIegx1OdUc.6WfnDGf3X9j1kPd487kDyN5jUZZA5potpybFwwpwwr4KlrygEtJASpKNQfgfIOrctJymGJHioeAlQbqWH5VXjWr1oBMktTdQA9vSUZ1IFVWoxWVlbUQCFrPYodSfq4BDm5sq2PWy9uhrNTQngjY6xw456xoXSXdl5YAEUxNRt9jPl75ZMyJkDfcDkhJPUcR+P2IseHSV2hCs8TxIsDXk.YXhak0Gp0y6b.USyVHXMA+DxhzbLDrOfcNzmpoQqRNGvhOCpGPKmSYAvze.t8sSal8W81cxzA65sKVow9nOryojiacu6YMLYeXdyuw6dAdF5zI9yy2Mqejj33up723zbMaT9r+xcbFjncAbtpAm2NqcQj9k.yUcLTw2AJmCByixj9Gx1EEi9oofCuQNQJlXcdVs2dYq4agEZdV4OVP0y1QMdMhTA.Abl1XwVUkwPSJEulw+asY+gBw65zkq8FtXLtzBvHPy9XfwzKmbamVCF.euJGfq3z9m+3bSDKSSUAGS0Qbf337zwi5ArOOF3cIPmvC.rWBoflw0wwXFnGS5mL3egmTgMvw1oBajIzZDEtc4q8Lavwq+rZxL.ljI27qjyw3XR995o44Qvswdsm2rK0bFtwM0vMuoF9napgO9lZ3V2TC+xapge062P7xx6MVqFY11XYcb2VImCaa2RRAFXBa05+.zjK05A
EDIT: Included @ulrik 's neat solution and modified it so it scales if you adjust the panel height and reduces the font size if the height is less than 200.
-
@ulrik Very neat!
-
@M_Holloway thanks!
-
@ulrik Thank you. :)
-
@M_Holloway Excellent
Thank you @M_Holloway @ulrik