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+e.tGNgI
-
@udalilprofile said in Arc slider:
you are using Global LAF use Local LAF
const Knob1 = Content.getComponent("Knob1"); const laf = Content.createLocalLookAndFeel(); and Knob1.setLocalLookAndFeel(laf);
And goto view > Reset Custom look and Feel
Restart HISE in order to see changes. New Knob (Default one) should come up . -
@DabDab Hi. Thank you. I tried to do it, but nothing works.
-
@udalilprofile here you go
I changed to "local look and feel"
and attached the laf to the knobs at the bottom of the script
beware that only the knobs that pass this condition will be visibleif (obj.text == "GlowingArc")
HiseSnippet 2541.3oc6Z87aaibElJNrMR6lMIKJZQAJJlpSxIJJjTThR0XancbTpgicTh8lzTizsiIGIM0TbzRRYas6Fffh8PO1dbWfVr+YzBTfVTfBzitnW5w1asGJvdomaeCGJQR8iXYuIY81tz.xhy7dy789l2al2iTM8XVDeelmTlbaOnGQJyqKu0.2fN2pCl5Js1pRYth7Q+7i9ji9XzQe7Q+xi9UG8KjVYPOruOwVJSlEtCWrLYOuT30mdyUvNXWKRbSRROjQsH2k1kFD2ZSy0oNNMv1jsocSHst4ZVL2awbX8AHsfrhTOr0d31jMwbwNmrz2G62QJyUksU0UaUyBWslptlkkVMCs5FVDbqVjppULzq0RuE1RQSJyW411z.l2VA3.huTlyuBydvVcXG3JlfGR8o65P32nJsELyhlavbr4lHuUoa0g5X2bHW4KAiRyXlaAAy80j2fZSG0dLCd4vNPwZjj.ybtzvagTvSMI7TR.uo.oLIfz4EP5JxaY4Q6ED2CGOul7ZtADOfdHofhPVoy8uxJeKFHgaPot38HM7faFoQgxJJEQZJJKtTtb4twM9Nn2JwE5tL1dnkcsQMHDmTcAxlsKrfinAHGlE1oHBCxgCBvVcH1nfNDjCtEJfE908bY65i1kEDv5hXPycn9H+PDlCbQ7CP6i8BU3sPCQqkGAHw6xGbNN.XvQQgHjhPa4PsId4.kJ4QZS8ASpQeWq.JysPdaO7AOfEf8FHDKeQTqgc1tHhs6OYwbue33bGG1AT21nk8rPqCvLGh1BU.DnT.4v.vnQ4iDAjH+hnbH358C+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ye.NeAkZyJnzrb4ug43AkO6OT4QiBJ+w+5u8+drfxKOdP4O8pe3xyNn7Dsc3WFT9kAkegOn7Bi90cP61ygbmXvIZ.wa44eP4pDdcPIZ3QiW4wT9werl69Dufl7kpwi.W3UcD3WDbreS4PZ9rNHEuuzyzf7x7hX+bBhOf0m+.G1.G3QghZj2re2sfBdrH.7bgJq4ukkLmi+9PD2qvumChsHt1g27efqnNU42mIpS0gcljFjEzPN4QOnLwOymQODqT19J8gj0GqT7euYSOx9TxAQu5hQGq9BKJ8UBm7pXN5hs7Xuik3cHw294Bgs.1sa3uQsrxavuGk90VEd0kZSeGKqzC0DJpcZUr7oUQ8SqhUNsJV8zpnwoUwZGuh7ekdK2Of0UregjzFMus340k41CeVVYVP5+hF.ERY
-
@udalilprofile
As @DabDab said, definitely drop the globalLAF for aContent.createLocalLookAndFeel()
assign as many knobs as you need to the LAF like so
Knob1.setLocalLookAndFeel(laf)
You have a condition in the LAF that requires the button to have its text set to
GlowingArc
so just don't forget that in other knobs or they will jus be transparentSome advices:
-
instead of using
value, min, max
and compute your range, you can just useobj.valueNormalized
which will always be a 0 to 1 value and made exactly for this kind of job. -
Also, this:
g.setColour(obj.textColour); g.drawPath(K, pathArea, stableSize * arcThickness ); if (obj.hover || obj.clicked) { g.setColour(Colours.withAlpha(0xFF009768, 12.00 )); g.drawPath(K, pathArea, stableSize * arcThickness ); }
just simplifies to:
// I dropped the alpha as 12.0 is equal to 1.0 (alpha is a 0-1 value) g.setColour((obj.hover || obj.clicked) ? 0xFF009768 : obj.textColour); g.drawPath(K, pathArea, stableSize * arcThickness );
- Instead of using panels on top of the knob, the circle and shadow can be handled by the LAF as well. You don't need extra components for that.
-
-
@ulrik Thank you very much for your help. And especially for the snippet.) Can you show an example of a gradient?
-
@ustk Thanks for the tips. I followed your advice.)))
-
@udalilprofile Gradient fill:
HiseSnippet 879.3ocsUstaSCCE1tqAwJLDHwCPD+JEMFIaktMMgXzaPErsJJ2jPHjahSi0Rrirc1nB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HD5nAcyWigwc4DfAlyVQ+RqK+XF
-
@udalilprofile as @ustk already showed you, but you can also make circular gradients with several colours, see this example
g.setGradientFill([Colours.green , a[2], a[3], Colours.red, 0, 0, false, Colours.white, 0.5]);
the "false" statement means "linear" gradient, "true" will set the gradient to "circular gradient"
and you can add more colours (both for linear and circular versions)see the docs here:
https://docs.hise.audio/scripting/scripting-api/graphics/index.html#setgradientfillHiseSnippet 1148.3ocsWstSibCE1CvTsSZQpqTe.FE0eLTgfbiPZQUMK21h5BaDY6pJgVsqiGOYbwwNx1CPTER8QouF8spuAsGOSByD1DtjBiPg3yEe9NG646bRGkjP0ZoB4T5ciFRQNeka2QBS7dwXl.cz9HmUcesBGxnBi1uFZ2QCwZMMD43r7qsl33sBJ84e9ocwbrfPyEgPuWxHz2vFvL4R6z9WXb9g3P56XCJXci1GQjh8jbYB.mkcqfFhImi6SOAaMaIWzOi0wHmuyMrZipQsH3lsp1nFgTq01099sITbTDsY0s1tQqnFQXRkZHmu3fPlQp5ZvFpF4rxtxvQcikWJxBv6YZVON0tnJpKD4LwGJ4g1TzJEsWLiG1YRcRifcoSdUa4rp123dLKjci77p2WmpvO2ihEPmklFdKOE7pVDdUJ.uY.ImBPZkLH8R2tDEanIWiEOeo6QBCUAkG5TPIyVzR+sq6dRvBgYiA3yoGpfE23QPyJUV2G9XscJUBNqzF+NXAkq8+Q+Id0mZdEmumbvPovdmInbpIkK3xof4QIBhgIEA8WqzeTx6BrxGChMwLscKdijf46JSDg5.az75uQDboA14fxUtJJpd5icS8J4oujYHw9ASbNnLKr7ZqUxC1XOBVS8yvP0x+f2la5yYBJDt9iuUC1.6tlZlbM+PHPAmkcOTuAIFqLJZhlttekz+lnQpvh9TEMbce7Y09f8y5vmQXtl9AKx775on3y2YZTTalnvGxgXenj4Suxnv9jzfbOXquhRE9SG9I5RwUFfSQTtlKiYFaxrwV2AJqmhROBSQ3I7Gd4pGOglAnMqkAI6+mAnLpj6pJ0XdwegJTOJTc6S36qTs0cbfZhginoPp948Lsdtrdbf9LE74xR2cqrsuiDpYVBYq8ynz+3SoQTNWd4+q5eAqm5Exh4FQpDQPfnpri6Jaz5VI40V1hLljC3b1PMM.CVbMPMEIU9AC8YhwLZ.6wPaF0AHxMmJSLvoaPmSWamIDWvUvSjF5aEAoDXkttj+sUEEMScVlRkjyopYp11TTcWNFHRFzipV2+BLjm2XHP7Oc2D242MoXyNRFwcACkhiDLyaGREyqEHZLaO7se8n8wFrsEzXYfcCoJCyBAm8oW.C.j0Pxycep9bibHzV9l9Cv2MoZWcR6Ja4GwflRuvMi0Fc0MyH7mm0dT9.Cea6KYgl3bsQsior9wlhRPOhPUqPn9j9YMT0mWV092epCUi4kUO8gZq4kU+0nm5P0bdY0CLTe9.SvnZxPfvyL87a1obGq.dMbpglrCFIzLynhSA+jMT2CEhuzsic9mYiwklAFgWVeNv33QgW08.XNbhIGfq3d3u87L2KJiYt+wXihA2GbOIYPWnY.gBQWX4wAYNKYIrxVWwt1VA5REgoK9W3Yrxp10NiUVchRz.LQI+HIi70Nr8KRk.XRj9CS7bO1t1uJJkPtXcd.L6+GIjo2pOywZKpi0WTGarnNt0h5XyE0wsWTGac+NZ+oYuJwHGj8ZCBcbmCR6l43bf.C2.Sush9O7n+0vA
-
@ulrik Amazing! Forgot the function has override!
-
@ustk said in Arc slider:
@ulrik Amazing! Forgot the function has override!
Yes I had also forgot it, but I found it in the documentation.
So, what does "override" really means?