LAF- Alert Window: customize text and icon
-
Hey guys,
has anyone successfully customized the icon and text within the alert windows?I can style the title and background of the whole window, but the styling of the actual prompt text is not responding to commands explained in the Docs
https://docs.hise.audio/glossary/custom_lookandfeel.html#alert-windowsThe dialog text stays white, which is not good since my background is white.
I have the latest commit of HISE as of an hour ago.
Thank you.
-
Did you try this one?
laf.registerFunction("getAlertWindowMarkdownStyleData", function(obj) { obj.font = "medium"; obj.fontSize = 18; obj.textColour = Colours.red; return obj; });
-
@d-healey Thanks, Dave. I see what was wrong. I had specified the color within (Colours.red), while you had it with just Colours.red.
So, you solved that. Thank you.Do you have an icon script that works? I copied the one off the docs to test it, but it is not showing. It just disappears the default one.
-
laf.registerFunction("drawAlertWindowIcon", function(g, obj) { var a = obj.area; var path = Paths.icons[obj.type]; g.setColour(Colours.red); g.fillPath(path, a); });
-
-
I have a namespace called Paths, inside I have an object called icons in which I add my path objects. I have a path with the name of each alert type:
Paths.icons.warning
,Paths.icons.error
, etc.I wrote about this in the docs - https://docs.hise.audio/scripting/scripting-in-hise/hise-script-coding-standards.html#svg-paths
-
@d-healey Thank you. I understand. I think you mentioned this in one of your videos. I will check out the documentation.
-
@d-healey You have a little typo in the doc. After the SVG array, you are missing
;
I wrote about this in the docs - https://docs.hise.audio/scripting/scripting-in-hise/hise-script-coding-standards.html#svg-paths
-
@gorangrooves Thanks, I've fixed it now.
-
@d-healey Thanks, Dave!