Forum
    • Categories
    • Register
    • Login

    How to add Images to Preset Bank?

    Scheduled Pinned Locked Moved General Questions
    11 Posts 2 Posters 120 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.
    • David HealeyD
      David Healey @duma
      last edited by

      @duma Yes it's the same thing, just a different column index. There's a video about it on my Patreon page.

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      D 1 Reply Last reply Reply Quote 0
      • D
        duma @David Healey
        last edited by

        @David-Healey I don't have the money for a patreon how else can I do it??

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @duma
          last edited by

          @duma It's the same as you do it for expansions, except you use the bank or category column index instead.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          D 1 Reply Last reply Reply Quote 0
          • D
            duma @David Healey
            last edited by

            @David-Healey What command must I use??

            David HealeyD 1 Reply Last reply Reply Quote 0
            • David HealeyD
              David Healey @duma
              last edited by

              @duma It's not a single command, you need to load the image into the look and feel function and in the drawPresetBrowserItem look and feel function you draw the image when the column index matches the bank/category and the item text matches your image.

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              D 1 Reply Last reply Reply Quote 0
              • D
                duma @David Healey
                last edited by

                @David-Healey would this be correct? ```if (columnIndex == targetColumn
                && itemText == "MyPreset")
                {
                g.drawImage(myImage, ...);
                }

                D David HealeyD 2 Replies Last reply Reply Quote 0
                • D
                  duma @duma
                  last edited by

                  @duma if (columnIndex == targetColumn
                  && itemText == "MyPreset")
                  {
                  g.drawImage(myImage, ...);
                  }

                  1 Reply Last reply Reply Quote 0
                  • David HealeyD
                    David Healey @duma
                    last edited by

                    @duma said in How to add Images to Preset Bank?:

                    would this be correct?

                    Try it and see

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      duma @David Healey
                      last edited by

                      @David-Healey Nope, didn't work I tried this as well and it didnt work

                      const var laf = Engine.createGlobalScriptLookAndFeel();

                      const var myImage = Image.load("{PROJECT_FOLDER}Images/BASSLBL.png");

                      laf.registerFunction("drawPresetBrowserListItem", function(g, obj)
                      {
                      if (obj.text == "Bass")
                      {
                      g.drawImage("BASSLBL.png",
                      [0, 0, 50, 50],
                      0, 0);
                      }
                      });

                      David HealeyD 1 Reply Last reply Reply Quote 0
                      • David HealeyD
                        David Healey @duma
                        last edited by

                        @duma Use local look and feel instead of global.

                        Put your code in code tags so it's easier to read - this button: f5964321-82e0-41c8-a04b-3f6a7a167b37-image.png

                        Image.load("{PROJECT_FOLDER}Images/BASSLBL.png");

                        This isn't a function. Follow what I showed in the expansion column video for setting up the look and feel object and loading images.

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

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

                        16

                        Online

                        2.3k

                        Users

                        13.7k

                        Topics

                        118.9k

                        Posts