Custom Sample Import Window
-
@fpelle I think you'd have to edit the source code. Why do you want to do that?
-
@d-healey I want to customize colours, fonts and text...is it possible without touching the source code?
-
@fpelle I understand what you want to do, but why do you want to do it? The user doesn't ever see that screen, do they?
It might be affected by global look and feel but I'm not sure, give it a try and see.
-
@d-healey Now if i load for the first time the plugin appears this dialog .
I want to change some graphics without changing the functionality.
-
@fpelle Oh I thought you were referring to the sample import dialog. I think those buttons are customisable using global look and feel.
-
@d-healey can you help me with a link to some documentation or with some snippets please ?
-
-
@fpelle Not sure... Please Try it..
const var laf = Engine.createGlobalScriptLookAndFeel(); laf.registerFunction("drawDialogButton", function(g, obj) { if (obj.text == "Install Samples") { g.fillAll(0xff563489); if(obj.over) g.fillAll(0x22000000); if(obj.down) g.fillAll(0x22000000); g.setFont("Arial", 14.0); g.setColour(Colours.goldenrod); g.drawAlignedText("Import", obj.area, "centred"); } else if (obj.text == "Choose Sample Folder") { g.fillAll(0xff563489); if(obj.over) g.fillAll(0x22000000); if(obj.down) g.fillAll(0x22000000); g.setFont("Arial", 14.0); g.setColour(Colours.goldenrod); g.drawAlignedText("Locate Directory", obj.area, "centred"); } else { g.fillAll(0xff563489); if(obj.over) g.fillAll(0x22000000); if(obj.down) g.fillAll(0x22000000); g.setFont("Arial", 14.0); g.setColour(Colours.goldenrod); g.drawAlignedText(obj.text, obj.area, "centred"); } });
-
@DabDab Thanks!!! It works!
Do you know how to move the buttons?
-
@fpelle You can't without editing the source... LAF is only for styling purpose
-
@fpelle you can also remove one or both of those dialog boxes to make things easier for your users.
I changed the text to something along the lines of "Please Choose Your Sample Archive Location" and only allow the "Choose Sample Folder" button to appear. Then, instead of the HR1 process, I just provide users with the monolith .ch files. I think @d-healey told me this a while back. I have had much less complaints this way than using the HR1 file.
To remove the box of your choice just enter these in the EXTRA DEFINITIONS sections of your project settings/preferences.
HISE_SAMPLE_DIALOG_SHOW_INSTALL_BUTTON=0
HISE_SAMPLE_DIALOG_SHOW_LOCATE_BUTTON=1Simple and maybe you already know but worth the post i guess.
-
@trillbilly Hi, and how the user can install the samples ?
-
@fpelle When you convert your samplemaps to monolith files, it will create a bunch of samples with a .ch1 file type. ZIP and send these to your customers instead of the .hr1 file as the Sample Archive/Sample Folder (whatever you want to call it).
Then, when users load your plugin, it will ask only for the Sample Archive/Sample Folder location. They direct to the folder you provide with the .ch1 samples.
Open a new instance of the plugin and viola...