ButtonPack Colours
-
Hey again, i'm trying to change the colours of the ButtonPack example from the docs, but can't find the correct Colour ID. I checked the function in the code, but this here doesn't work:
Any ideas? -
@toxonic check this snippet, it's based on your old buttonPack snippet
HiseSnippet 2368.3ocsYstaaibElxwb6J0FfrEEn.E4GS8OJnbjkkrcbCrp23awcc65KXUZ1.XXXLlbj3TSwgkbjsTSLPeD6iReC1dlKTbDEoks2rDAwZNy417cNyYtcVLykjjvhspT88iiHVU9M1cGGx822GSCsN5.qJ+V6tj+0PRnKI9x2SR3qrl0diivIIDOqJUd1eUvWkpKZI+9eucOb.F3Mijk0GXTWx2SGP4YTOam+NMH3PrG48zAFbuwNG4xB2mEvFB9zyraYEgcuF2mbBVv1B1VU9p24Q4r3tbLmjXUYw8Xdi65ytMTw+GnIzqBHhFss5BJRQ9PVfmviETs12mF3cV5XOwBzxYYHwyTHwuy9XpGcB8LD4ExNPYRXhGUVXZ26YS4dsMcuVFtWAtTECWZQkK8M1ccioQ7rdD9yu19nPNItGFfcSWQwq0B+2eu8yqsOC3Ij2b.9ZxgwPiIx3rYqVMPutUq5cddMYvuoGoGIdebPvU.3m3viGRp2oVHDBRfvAAs2PNmEdFzYsOUCAeqtJREyPGcPxVRRx+ChkIbzM3Xzd.y8iYCC8TLdjGZaTqN44Rp3SCM3ocI7zqmASq0Iylqt7xn8iIB3GgMb0lnkWUx.MLfFRP8FF5xorPjqj4LFcDCzFnQMPiqKEPMFEeALWb.5VpWeBGLaJnh87NCGRBLkzviDeorlPDQuHRLmRRf.wf+V2SOQKWlcVBLA2eosPhXSFUeBsuOGHu9ZFTg3D61IQKn2k1OfB+pA56X2PhQ+IzAw398og8WxPpD7MjiBOKl.dDHiHFazKKBCS5A5smP6t7CIELzzCywMCvIboUHdGE5QFAfyJ5HWdV8f4Be.GLjjk.jmOAHAy13+.aHGBUNogJm90mvZFXI9DIFgCGnBhIfl49zDk8tRRSZwjlAjv9b+NyHqhoeTf5fvNRoAOQRvo9JsqiV0P+YxOkh52rG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tC4rApoC.gydmrVbkJuKDCYVxrPq+OwPACaB
-
@ulrik Yeah, you changed the colour inside the button script, but i want to create multiple button packs with different colour sets. This is why i tried to use the function
ButtonPack.setColour
-
@toxonic Aha, ok sorry
-
@ulrik Since the ButtonColourId are defined as variables in the first lines of the script, i thought, that
ButtonPack.setColour(Sequencer, 1, Colours.greenyellow);
might work... but it doesn't either. -
@toxonic yeah, I tried that too but with no luck
-
@ulrik Changing line 48 to
g.setColour(this.data.buttonValues[i] ? this.data.onColour : Colours.black);
was enough to change the on-colour.HiseSnippet 2360.3ocwZs0aajaEdji0hZ0cA1EXeXQeh0OTH4HqHoj3VXU2Mw1wcUasiQjSZ.LL7ROCkFhLhb1Ynrs1.+is+C5+f1CImKbtIIKjhJHXngy4F+32g7PRed.2lDFxCrps0Ey8IV0955ilyDtG4hoLqgGaU6Gpe3LgfyNGa+IzQbO9r.zEjPg0gy8wggDGqZ0dxeUJcss1zR84e+iGh8vLaRZSVVefSsI+C5TpHs0ye0em54cB1gbAcpgzu3UCs4Lsyrp8j5cs7AuimPNCKEai5V09p23PE7fQBrfDZUayC4NyG4xuiok+CzP5MdD4C8rFAFR27IbOGYDKa05HWpmy4wHPnEXkySwimnwiuu9oTGZR6o3x2pdAJUCS7n1FYCumjI75YFdcMBuRBoZFgzl5P56pOxNf5KReiLd9s0GxDjfwX.1MCEsrVa7u9g5GwAIXhNSwehbR.7PhFM2qa21H3OsFznwy1YGzEtDjw3NMDgQgDAhOF4xCn+JnL1yaNB6QmvHNnaTxFhtykZ61XGDBYiYnaHHAexDOo.yQNA3ISnrIH9sj.jvkLsSicTx99PXrceTzS85fNJf..mTFynXVnT6zF5XqDKsglLfezFceazbniHsU+NnQPXKMDa1za.+B8f3fUIA7o4I7.n+w8EzoXOD12mfCj721fKIvati5HbkZ9yfQztKbmyPOE06maoLxKRcish0FVLXA3Syna1BgYNJgmPukvhTAM73PkwdYGzPl50xb.lHf6cD.12.FoM.qddlVcluC.AM8wLh2E72qdpEf5n.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