HISE Logo Forum
    • Categories
    • Register
    • Login

    To register local look and feel for panels, do I use "drawPanel"?

    Scheduled Pinned Locked Moved Scripting
    5 Posts 3 Posters 96 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.
    • VirtualVirginV
      VirtualVirgin
      last edited by VirtualVirgin

      I don't see a list anywhere of the inputs available for "function name".

      ScriptLookAndFeel.registerFunction(var functionName, var function)
      

      Do I use "drawPanel" when making custom look and feel for a panel?

      You can listen to my orchestral mockups here:
      https://www.virtualvirgin.net/

      A 1 Reply Last reply Reply Quote 0
      • A
        aaronventure @VirtualVirgin
        last edited by

        @VirtualVirgin no, just use .setPaintRoutine

        The methods are all the same but you don't get an obj, instead you can refer to the panel with this

        VirtualVirginV 1 Reply Last reply Reply Quote 0
        • VirtualVirginV
          VirtualVirgin @aaronventure
          last edited by VirtualVirgin

          @aaronventure said in To register local look and feel for panels, do I use "drawPanel"?:

          @VirtualVirgin no, just use .setPaintRoutine

          The methods are all the same but you don't get an obj, instead you can refer to the panel with this

          Thanks. I was using a paint routine to prototype, but I'm trying to get the benefit of LAF to be able to assign the function to many panels.

          I tried this:

          	// Local LAF for diagonal text labels
          	const diagonalText = Content.createLocalLookAndFeel();
          	diagonalText.setPaintRoutine(function(g)
          	{
          		(paint routine stuff)
          	});
          

          ... but the console tells me:
          "function not found"

          Is there a way to word it or set it up to use as an LAF or like an LAF?

          You can listen to my orchestral mockups here:
          https://www.virtualvirgin.net/

          d.healeyD A 2 Replies Last reply Reply Quote 0
          • d.healeyD
            d.healey @VirtualVirgin
            last edited by

            @VirtualVirgin said in To register local look and feel for panels, do I use "drawPanel"?:

            Is there a way to word it or set it up to use as an LAF or like an LAF?

            You can assign a single paint routine function to many panels. I have a few videos about paint routines, this one in particular will help in this situation - https://youtu.be/jO-KOEcJRKo?si=QwdbZVcFtVhuXA3p

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

            1 Reply Last reply Reply Quote 1
            • A
              aaronventure @VirtualVirgin
              last edited by

              @VirtualVirgin define an inline function with a g argument, write it and then just pass the function into the setPaintRoutine method call for any panel you want to use it for.

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

              17

              Online

              1.8k

              Users

              12.1k

              Topics

              105.5k

              Posts