HISE Logo Forum
    • Categories
    • Register
    • Login

    How Can I Make Multiple Skins/Themes

    Scheduled Pinned Locked Moved General Questions
    23 Posts 5 Posters 963 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User @A Former User
      last edited by

      @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);
      
      
      
      ? 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by d.healey

        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.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @d.healey
          last edited by

          @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

          ? 1 Reply Last reply Reply Quote 1
          • ?
            A Former User @A Former User
            last edited by

            @iamlamprey haha.. Don't worry I will keep asking you.

            Cheers !!

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User @A Former User
              last edited by

              @iamlamprey Thank you so much. :)

              1 Reply Last reply Reply Quote 0
              • S
                Sawer @A Former User
                last edited by Sawer

                @iamlamprey Screen Shot 2021-02-09 at 17.08.48.png
                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?

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Sawer
                  last edited by

                  @nesta99 How many copies of the HISE source code do you have on your system?

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    Sawer @d.healey
                    last edited by

                    @d-healey Just One

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Sawer
                      last edited by

                      @nesta99 Are you using git to manage versions?

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        Sawer @d.healey
                        last edited by Sawer

                        @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?

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @Sawer
                          last edited by

                          @nesta99

                          Link Preview Image
                          GitHub - christophhart/HISE at scriptnode

                          The open source framework for sample based instruments - GitHub - christophhart/HISE at scriptnode

                          favicon

                          GitHub (github.com)

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          S 1 Reply Last reply Reply Quote 1
                          • S
                            Sawer @d.healey
                            last edited by

                            @d-healey Thanks Man!

                            1 Reply Last reply Reply Quote 0
                            • Y
                              yall
                              last edited by

                              is it possible that the vst crash because it has too large images?

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post

                              25

                              Online

                              1.7k

                              Users

                              11.9k

                              Topics

                              103.4k

                              Posts