How Can I Make Multiple Skins/Themes
-
@iamlamprey Thankyou.... but the snippet is not opening.
Thanks
TM -
@iamlamprey Can I get archive file? snippet is not opening.
-
@Tania-Mosh Weird, it works on my end. I'll post the code because I never ended up saving the archive.
It just adds a switch statement and calls Panel1.repaint(); to re-colour the panel.
Content.makeFrontInterface(500, 400); const var laf = Engine.createGlobalScriptLookAndFeel(); var colour1 = 0X30000000; var colour2 = 0x96323131; const var ComboBox1 = Content.getComponent("ComboBox1"); laf.registerFunction("drawToggleButton",function (g,obj) { //g.setColour(obj.bgColour); g.setGradientFill([obj.itemColour,0,30,obj.itemColour2,0,2]); g.fillRoundedRectangle(obj.area, 15); g.setColour(Colours.black); g.drawAlignedText(obj.text, obj.area, "centred"); } ); laf.registerFunction("drawComboBox",function (g,obj) { // g.setColour(obj.bgColour); g.setGradientFill([obj.itemColour,0,30,obj.itemColour2,0,2]); g.fillRoundedRectangle(obj.area,10.0); g.setColour(Colours.black); g.drawAlignedText(obj.text, obj.area, "centred"); }); laf.registerFunction("drawPopupMenuBackground",function (g,obj) { g.fillAll(0xD7000000); } ); const var Panel1 = Content.getComponent("Panel1"); Panel1.setPaintRoutine(function(g) { g.fillAll(0xBA323131); g.setGradientFill([colour1,10,30,colour2,10,15]); g.fillRoundedRectangle([4,0,this.getWidth()-8,this.getHeight()-120], 10.0); g.setColour(0xFF171717); g.drawRect([0,0,this.getWidth(),this.getHeight()], 4.0); }); inline function onComboBox1Control(component, value) { switch (value) { case 1: colour1 = 0X30000000; colour2 = 0x96323131; case 2: colour1 = 0xFFCF8B43; colour2 = 0xFF93611A; case 3: colour1 = 0xFFD9D9D9; colour2 = 0xFF464646; }; Panel1.repaint(); }; Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
-
The snippet opens for me. I don't use LAF for customizing my interface (at least I haven't yet) I use panels, including for combo boxes, I just make them transparent and draw the design I want on the panel. I thought I'd made a video about this but I can't find it so I guess I haven't got around to it yet.
-
@d-healey I just vibe with my png and knobman files :(
I enjoy when people ask questions here cause it's like little homework snippets for me to get better at HISE
-
@iamlamprey haha.. Don't worry I will keep asking you.
Cheers !!
-
@iamlamprey Thank you so much. :)
-
@iamlamprey
Hi! Strange man but Hise on my mac doesnt see the ".createGlobalScriptLookAndFeel()" function , it is not in the api. But my version of Hise is the current so I dont know why there are some mismatches...Can someone help me out? -
@nesta99 How many copies of the HISE source code do you have on your system?
-
@d-healey Just One
-
@nesta99 Are you using git to manage versions?
-
@d-healey no to be honest, just went there before to look for some updates but nothing... maybe I'm looking at the wrong place... can you send me the link kindly?
-
@nesta99
GitHub - christophhart/HISE at scriptnode
The open source framework for sample based instruments - GitHub - christophhart/HISE at scriptnode
GitHub (github.com)
-
@d-healey Thanks Man!
-
is it possible that the vst crash because it has too large images?