change size of "Add preset" window
-
This post is deleted! -
@treynterrio said in change size of "Add preset" window:
@d-healey I can change everything the "Add" the "Ok" the "Cancel" but I can't change these?
You can change their appearance, so they look a different size, but their size will still be the same.
I think you use the
drawDialogButton
laf function for that. -
@d-healey is there a way to lay a Label over the Add new User Preset to Display my own text?
-
@treynterrio no, but you can change the text with laf i think. Probably one of the alert window functions
-
This post is deleted! -
@d-healey as soon as I'm using obj.text or obj.title I don't have no more buttons and everything in my. Preset browser isn't centred anymore to fix this I've to reopen the project. I can really change everything but I don't know how to change the Add new User Preset text
-
@treynterrio Post a minimal snippet
-
@d-healey the first inline function is for the Add new User Preset Window
HiseSnippet HiseSnippet 1672.3oc4YstaaaCEVJMZa1qasEXO.B9WNntF1NoIwMHnwWKLpShgsSWABBJXjns4BMoAEctrgf8trmj8m8drGg8FrcnnrrrisxstgBLEzDoyExuyGOjRmSaI3NXOOtvvLQ2qFgMLepUmqXxAUFfHLiFUMLehUdixWMB44gcMLMex6TJLSrpg+0e81xHJh4fmJxv3CbhCtIYHQNUZq8dOgRqibwcICiX8F60vgypvo7wB0jkyXDx4LTe7AHkYqXYX9U0bIRtniDIwdFlVk4tW0Y.+Bl19OP7HmRwZj1AFHs35bpqBwJoGdNVbNAeQTYFUFPntslP.dFFlq1ZJc7DMc7CV6SbIgxmRKO2Wg8TOhxQlqLKjWcFHmOJjysPHmaQvyLB7VUCuWX0wQPFImpQgsu0pAShE8PvxRTXos0Xk+36spvAKXxrCQmgqKfGB8H8lalKC7u01IYRXkwSZepfegGVzD0ydW6Zr9DFNqi.Cg16n7SQT8v1jyOqDysNFSSq7kvnfg18FybjDNyVfGxOWMWC6xGkFA9mwFMjOlI6xa6qasj+RRa3hxcPTaDLYGqL63bm.VptI+jaJbx79dxN9t5+q.ase4tyYzNSUW3D6WsX0BrbrfYi1I40ISNMzyJv8Id.GUOHfRmxUftnk.6gkk0lUkfn79oxDFzo6mwle5OEDX8y1C1BThRSm6x50y4esl8NZUvnn2DDU4NScqMfT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b3fxi82tlK65yck4dJGDeh+bnpkV0PfPZKXFxrn+D5kFYs4WzB45BYz2U+BiyxpiQUbvwZEphXzb27ZllgMulIKB2PaxqMFOxENonTOnHX0F9IMcCNKf7yQZIY58TxLL+ZK+CSij5u9bo9F2ribO2Zet6XJRNayBUcMMPAj7OSW4TcdCxLjWEsqpO5NHtvSwtiv8EVsHRmAKFuqr.7BmF9uMdC5G62YUqWO30rSA6pV0+3m2lutPn.uhWcJ89Hof.mHaA6Y6.YDNX.ILF7QEpClWQ8lB8y4TOqXlNXlq+C+MbEnLu5Yy.k4mnzXHxQv+ji9sdpN99M9R.Lw7aFdBq8UOam2v+MgfeV4xlyXHwk7IGGEU7J.6K1mBO.eV+A3yFO.ed8CvmMe.9r0Cvmsi0G0+G.kFK4C0aS.Asp4+9PSyZLDjk4mQZ7O.UU67aC
-
@treynterrio I can't open the snippet. Which commit of HISE are you using?
-
-
@treynterrio create a floating tile with a preset browser and paste this code to the script
const browserLaf = Engine.createGlobalScriptLookAndFeel(); inline function removeFromTop(area, amountToRemove) { local a = [area[0], area[1], area[2], amountToRemove]; area[1] += amountToRemove; area[2] -= amountToRemove; return a; } browserLaf.registerFunction("drawPresetBrowserDialog", function(g, obj) { g.fillAll(0xFF000000) ; g.setColour(0xFF000000); g.fillRoundedRectangle(obj.area, 0.0); g.setColour(0XFF999897); g.fillRoundedRectangle(obj.labelArea, 0.0); g.setColour(0XFFFFFFFF); g.setFont("ARIAL", 10.0); g.drawAlignedText(obj.title, removeFromTop(obj.area,1), "centred"); }); browserLaf.registerFunction("drawPresetBrowserListItem", function(g, obj) { if(obj.selected) { g.setColour(0XFF999897); g.fillRoundedRectangle(obj.area, 0.0); } g.setColour(0XFFFFFFFF); g.setFont("Arial", 13.0); g.drawAlignedText(obj.text, obj.area, "centred"); });
-
@treynterrio I think you need to be using the alert window laf functions to change the window's text
-
@d-healey I've tried all of these laf functions but nothing changed
-
@treynterrio Show me the code you've tried
-
@d-healey I tried everything from here:
https://docs.hise.audio/glossary/custom_lookandfeel.html#alert-windows
and things like this as well
if (obj.title == "Add new User Preset ") { g.setColour(0XFFFFFFFF); g.setFont("Arial", 22); g.drawAlignedText("Add new Preset", obj.area, "centred"); } else if (obj.text == "Enter the name") { g.setColour(0XFFFFFFFF); g.setFont("Arial", 13); g.drawAlignedText("-", obj.area, "centred");
-
I just did a little test, this seems to work for me
browserLaf.registerFunction("drawPresetBrowserDialog", function(g, obj) { var a = obj.area; g.fillAll(0xFF000000); g.setColour(Colours.white); if (obj.text == "Enter the name") g.drawAlignedText("My Text", [a[0], 10, a[2], 25], "centred"); });
-
@d-healey this works for me to now, thank you!!!