How to duplucate LAF knob
-
You don't need to put this in a separate file, and at this stage it might just be making things more complicated for you.
Here's an example of creating two laf objects.
const myLaf = Content.createLocalLookAndFeel(); const myOtherLaf = Content.createLocalLookAndFeel();
-
@d-healey thank you!
-
@AGD_ are you trying to have different designs for each knob or do you want them all to be the same?
-
@Chazrox thanks for your reply. At the moment I want to create 4 knobs with the same layout. If you've any suggestion, thanks.
-
@AGD_ yes.
You can highlight all the knobs you want to share the LAF. Right click and create a script reference to them as a group.
then do:
const var allMyButtons = [ Content.getComponent(button1), Content.getComponent(button2), Content.getComponent(button3), Content.getComponent(button4) ]; for (a in allMyButtons) a.setLocalLookAndFeel(myLafFunction);
thats off the top of my head. I think that looks right.
-
@Chazrox thank you and sorry for this late reply, but I wasn't in the studio yesterday. Thanks, I'm just starting out, so I might be asking some silly questions.
-
@AGD_ All good. lmk
-
@d-healey it's works fine! Thank you David! I'm looking forward to your next course because now that I've finished the first one, I'm having a bit of trouble following the correct order to continue, even though I'm studying your videos, which are fantastic! Thank you so much.
-
@AGD_ Thanks, are you on the Discord server? New course will be ready pretty soon
-
@d-healey yes I'm on Discord serve, thanks