LAF For CustomSettings, Can't Find The Thread :/

  • Hey Folks
    Searching For A Thread Or A Snippet To Change CustomSettings
    " Change Sample Folder Location"
    And Can't Find Any Result On The Forum.

    Any Help Is Much Appreciated

  • I Repaint All My Components, And Somehow
    " Change Sample Folder Location" Button Is Gone From The Floating Tile.
    Any Help?

  • HiseSnippet 1073.3ocsVEtaaaCDlzwJX1cdqEXO.B9W1.dFxYMsEKHXI1NNvXwIF0YECXXnfVhRlKTjBTTI0qH6YYOJ6+6oXuA6IXYGkrhrxbCZMv3uHu69n+tSe2QOUIcowwREBW6xkQTD9yslsTnWLXAgIPiGhveg0DRrlpryL0eYDINl5gv3cN0X.WqJJc82eWeBmHboElPn2HYtzyXgLcg0oG88LNeDwidIKbsne9QickhARtLA3yNVNnHh6Uj.54DSXUrP3cOwiokpYZhlFCwzW5sb1B4Mhr3eCKlMmSMG5glAWTlYzfELt2z7bMFgvUmVj46jk4ek0DlG6d6EUfml5vt.w50.bkxTpZIJ06CQoQRtm4B9.zCuF8plQumYMyUwhzEdLb6IViEvGGeBT1WmVYwhp7OXqARHBgtaH4J5HEb3dDsdgiSG68cbZePi5MpCE+XsMm3aen8Ih.lf10UQgz5TtbNgmckmIkWcrvaDkxakAC.zUQCXFQxnDgqlIEsZ5oH2LjQ3xf9IZsTzrisetyfN1x4+R6F0eei51vh4a2BLzUSem19vCsaB0dQ.0NlDFwo19lZkxlKcIF3MamgZEXyJnqOnnNlyakodhAB4YXWQ.wTclu6CYNOgVNFCmOlyBDTuKApbOmRoaWBTK5X2zEpkvs2r8AoHus9ssOHOyrkhykZ5EhVsq+950peac6G5x2ei9LejTRNmp1naSih5w.1RjDNmp5XeMwjV4ABpmxxyc+3jmtYZl0BTJFKX5KhnqNWHf6sAALZknC18CiGRzDildkMHtHpRyLzAOjdMLfHSgWyZHM9JsLJM1vHovbC3mnW0dlI.GwkfLPDbICnMCXvWZstodn2s9jlkEGN8nUDH6W6oVCRh0xvYTsAaLZdP9nmZ6BgemACSSCKr9m+wcOv5dqaNMOq7aXqTkYygJ10TUyu0VqRncxLklskLcQhNJQWxT+DeepZF6WKG4rztgWCeGKYNq4r+zIkCFznjPHulH8Lw6S3w4tbIb5HhKnJJ6HcV8wgxDgdRBWyh3rGv+AbJQYFFNXvCtyTtcVdGZ4bddxiyhyfQGfyeJqUzo69cx28x7s855b+t8JLluautNlM+bi52htg4oWfvV3+BiPKnrfEZyoeGazC+mopvrcoWBmnKOv27x1JGP9TZxpY5oHloWt9KeeBuB3rwWA1XSzGIcel0Tl1cwl4akMvWnY7+a9t5M0FVm.ZYWcAYqZM5G21GP+DnxqkIlt5IDshACDrNOIbFzu5RMOsHn7XilnhYPU1YGyYSkYFU3kd3NXsxYOyY7Jm8xchBItJ4acyF.ad09yRs.bRj9GVpA+yI3rcOT5PY.mkSWGTHz+7VWWSo3qAtuYL6sEX9ls.yy2BL6uEXdwVf4kaAlW8nXLitNNAF5m0l.FldR5TaL9DAATYoJRz+BX4nD7L

  • Okey Found The Issue 🙂
    It Was Because Of "drawDialogButton"
    And It Has No Color Coding For
    "Change Sample Folder Location"

    So I Added An Else, Add Repainted The Button 🙂

  • @d-healey Excellent Job Sir
    I Tried That Once With No Luck 🙂 Thanks For Snippet 🙂 Always Life Safer

  • @d-healey Haha, The Diffrence Was The C Letter In Cap 🙂
    Mine Was Like This :

        else if (obj.text == "change sample folder location")

  • @d-healey Sir, Do You Have A List Of Customizable Dialog Buttons?

    • Add
    • Rename
    • Delete
    • Save Preset
    • More
    • OK
    • Cancel
    • Replace All
    • Replace Next
    • Next
    • Undo
    • Save
    • Change sample folder location

    And Do You Have Any other ones To Add To This List?

  • Run Console.print(trace(obj)); in the LAF function and if you trigger any of the things it can style you'll see it output to the console.

  • @d-healey said in LAF For CustomSettings, Can't Find The Thread 😕:


    Like This:

    const laf = Engine.createGlobalScriptLookAndFeel();
    laf.registerFunction("drawDialogButton", function(g, obj)
        if (obj.text == "Change sample folder location")
            g.drawAlignedText(obj.text, obj.area, "centred");

    But This Does Nothing

  • @Natan

    But This Does Nothing

    You should see output in the console when you trigger the LAF function. Try opening a save dialog and it should trigger.

  • Yeah I Get The Idea :)Thank You Sir

    But Now There is 2 Missing Buttons:
    How to Solve These?
    This Shows Up At Very First, Once You Open The VST Plugin
    Screenshot 2021-07-09 025955.png

    There is Menu Style Button Is Here That Disappred
    Screenshot 2021-07-09 025922.png

  • You'll need to style them with LAF. First you have to figure out which buttons are missing.

  • @d-healey
    Not Sure What Is The First One 😕
    And The Second One

    Let me Throw An Else { Do Something } After All My "drawDialogButton"
    And See What's Going On

  • Okey These Are The Buttons. And Both Says Change Samples Location 🙂 WTH

    Screenshot 2021-07-09 031141.png

    Screenshot 2021-07-09 031101.png

  • My Bad, I Copy And Pasted Same "g.drawAlignedText("Change Samples Location", obj.area, "centred");"

    Lets Try Again

            g.drawAlignedText(obj.text, obj.area, "centred");

  • Fixed:
    Just Added An Else At The End Of "drawDialogButton" To Not Missing Anything.

            obj.over ? g.setColour(0xFFF9F9F9): "";
            g.setFont("Gill Sans MT Medium", 18);
            g.drawAlignedText(obj.text, obj.area, "centred");

    Screenshot 2021-07-09 032405.png

    Screenshot 2021-07-09 032343.png

  • @d-healey Sir

    A Quick Question,
    My Instruments Asked For The Samples HR1, And I STill Not Exported My Samples, So I Selected The Second Option, And Point The Instrument To The Projects Sample Folder, And It Works Just Fine.

    Is This Means That We Can Ship The Plugin Like That?
    DLL Files With Wav Files?

    If Yes, How To Ignore The First Option ( Install Samples )
    , And Keeping The Choose Sample Folders Option?

  • @d-healey Sir
    I Added This Line Into My Project, To Completly Remove The Sample Installing Dialog:


    And it works just okay.

    Now once I opened the plugin, there is no sound inside
    So I get to the setting tab and pointed to the plugin to the samples folder, and close/reopened the plugin, and all good here.

    Just Found Out That by default The plugin looks for the samples In This Folder:
    C:\Users\rezae\Documents\My Company\My Plugin\Samples

    So Is this possible to add this folder to the Installer to And make it Even less confusing?

  • Okey, I removed the first dialog and kept the choose sample folders.
    Evrything works just fine, except one thing,

    By selecting a sample map, if I click on a button ( I found which one is it )
    The sample goes one octave up, and down.

    Samples are just wav files, and I didn't exported them into monoliths yet.

    Is CH1 Files Contains The Mapping System?

    Edit 2 Looks like Sample Maps Gets Embedded Into The Plugin.

    So I'm Going To Ship The Plugin With CH1 Format, And Yeah 🚀

Log in to reply