Designing / changing hise output vst basic setting panels / elements?
-
@Lunacy-Audio, @Christoph-Hart, @d-healey
Woooops. After a registration of the
Engine.createGlobalScriptLookAndFeel()
functiondrawToggleButton", ... )
, the entire set of buttons disappear unless you use a paint routine. Removing the code all together does NOT bring them back!!!How do we "unregisterFunction" ??
I restarted HISE and still same issue. I cannot start over on my project. What´s the reset options?
UPDATE: solved this below :)
-
This has happened to me too, but do not fret! If anything you just need to rebuild HISE. Though, I'm sure there's a quicker solution.
-
@Lunacy-Audio
Okay, 5 mins after, I solved this haha. Here´s how:
- Remove the paint routines inside of the:
laf.registerFunction("drawToggleButton", function(g, obj) {
- then recompile all scripts / F5.
- then delete that code as well and this line: (or your equivalent)
const var laf = Engine.createGlobalScriptLookAndFeel();
- lastly recompile and save, exit HISE and start it again. Upon next start it´s gone. But that did not happen unless I did it in exactly that order.
-
Good to know!
-
@Lunacy-Audio said in Designing / changing hise output vst basic setting panels / elements?:
Ah yeah, I was going to mention you'll probably need an "else" statement to actually paint the others. Glad the
obj.text
worked!Indeed, the "defaults" for the LookAndFeel overrides, what is the proper way?
laf.registerFunction("drawToggleButton", function(g, obj) { if (obj.text == "Button1") { g.setXXX(obj.bgColour); } else { // WHAT TO PUT HERE ?? } });
@Christoph-Hart @d-healey Any ideas?
-
As soon as you start customizing LAF you most certainly never want to use the stock appearance anymore so there is no way of having both at the same time.
Also be aware that the obj parameter is not the object but just a plain simple Javascript object that holds relevant information to the paint routine. It basically moves all function parameters into one so that the function signature is consistent for all LAF functions.
-
Thanks for the reply! That clears it right up. But what I mean by "defaults" is the defaults for all other buttons that I also have code for. The "else". But yesterday late I found the trick. My skillset regarding the paintRoutine could be counted on a few fingers, so getting more familiar with that is todays mission. :)
However, I do not know the id:s / obj.text field values of the texts and panels in the basic archive / samples settings of the exported vst-instrument. The images above. I would like those panels/buttons/text in my finished plugin to look slightly different from the rest of my instrument ui, so the override should be easier if I knew the names of the panels! Is there a reference to those? Or do I have to look in the HISE source? Could you point me?
Or is there a better way?
I have been able to distinguish between different buttons, by using
if (obj.text == xxx)
, but for panels I cannot see any id or definitions. -
Re: Installing Samples Dialog....
I read this conversation from Installing Samples Dialog .... earlier this year, (about customizing the basic initial dialogues) and I was just wondering about this:
@tomekslesicki said in Installing Samples Dialog....
how can I change GLOBAL_FONT and GLOBAL_BOLD_FONT to custom fonts?
@Christoph-Hart said in Installing Samples Dialog....
I am currently prepping for a way to define a global look and feel that can be customised via JSON and is applied to all modal windows, confirmation dialogs and context menu popups. I'll let you know when it's ready.
@Christoph-Hart Was this scrapped? I mean the customisation from JSON? Or delayed? Or if it was morphed/moved into LookAndFeel?
-
@andioak said in Designing / changing hise output vst basic setting panels / elements?:
Or if it was morphed/moved into LookAndFeel?
This. It's more powerful this way than a simple JSON system.
-
Yes indeed it is. Just making sure there are no "quick fixes" :)
-
@Christoph-Hart said in Designing / changing hise output vst basic setting panels / elements?:
This. It's more powerful this way than a simple JSON system.
Yet, I cannot trigger any buttons on the plugin´s "Install Samples" using the
if(obj.text == "Install Samples")
inside thelaf.registerFunction("drawToggleButton", function(g, obj)
function. Is that considered adrawDialogButton
?This one:
Here I would like to:- customize the look and line-breaks of the text line and also remove/hide the "install samples" button and customize the positioning of "Choose Samples folder".
-
- is the text in the image accessible? Is it a panel or an alert window?
- or alternatively entirely remove/suppress the entire panel with a flag in HISE settings, the
HISE_SAMPLE_DIALOG_SHOW_...=0
and then put the "Choose samples location" in my own settings panel on the UI. Is that possible? Or is that C++?