How to add Images to Preset Bank?
-
Re: preset browser expansion column images
So I watched Davids video on expansion column Images but I want to learn how I can add images to my Preset Browser where all the Categories. Would I need to do the same thing as David did for the expansion column images??
-
@duma Yes it's the same thing, just a different column index. There's a video about it on my Patreon page.
-
@David-Healey I don't have the money for a patreon how else can I do it??
-
@duma It's the same as you do it for expansions, except you use the bank or category column index instead.
-
@David-Healey What command must I use??
-
@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.
-
@David-Healey would this be correct? ```if (columnIndex == targetColumn
&& itemText == "MyPreset")
{
g.drawImage(myImage, ...);
} -
@duma if (columnIndex == targetColumn
&& itemText == "MyPreset")
{
g.drawImage(myImage, ...);
} -
-
@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);
}
}); -
@duma Use local look and feel instead of global.
Put your code in code tags so it's easier to read - this button:

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.