Preset Browser LaF



  • Hi folks,
    There are many topics about this but I looked around to find a function to customize the Save/cancel buttons in the preset browser popups.
    I couldn't find anything so : am I missing something or do I have to change it in the source code ?
    Cheers !



  • @Matt_SF Take this in the meantime

    laf.registerFunction("drawPresetBrowserDialog", function(g, obj)
    


  • @MikeB Thanks Mike, yes I used this function but it doesn't allow to adress it's buttons... Or I didn't find the proper way 😁





  • It's a combination of this and the one above.

    laf.registerFunction("drawDialogButton", function(g, obj)
    


  • @MikeB 😳 damn, I looked and looked and looked but didn't find this thread...!!
    Thanks a lot Mike !! 🤘😎 I'll dive into it.

    Edit : everything is in the title 🤦♂



  • @Matt_SF Hey Matt

    Try The Above And Put The Below Code Into The Laf

    You Need To Do If Obj.text For Everything
    For Example
    Save
    Cancel
    Ok
    Rename
    Replace
    Menu
    Delete
    And Some Hidden One.

    Make Sure You Have An Else At The End Of Your Customization So Your Hidden Button Still Have A Color Or They Will Show Up As Blank.

    
    if (obj.text == "Add")
        g.drawAlignedText("ADD", obj.area, "centred");
    
    


  • @Natan I knew I could select specific buttons this way but didn't know this would work for these buttons too...! Thank you 😊



  • @Matt_SF
    Glad to help👏🏻



  • @Natan How do you this?



  • @Jay @MikeB @Matt_SF
    These Are All The Dialogue Buttons I Discovered So Far

    You Can Also Add Your Own Custom SVG Icons Instead Of The Button Names Aswell.
    Just Use g.fillPath(YourSVGIconNameHere,obj.are);

    Here is The Snippet:

    HiseSnippet 1414.3oc4YssaaaCFlJMpXwcYsEaO.D9Ja.WW6jtztFTjnXIkYTeB1tcEnnnfQh1lKxjFRzIwnH2rmf9prmf062KwdD1k6treJYaI23D6l1NLjPAXX9ef9ie7j7Ga3KbnAABej1ZsGMfhz9V8Vi3xdk5QXbTYSj12oWkDHo93HS6MZ.IHf5hzzt09JCZqsJJr726rGwivcnwlPnWJXNzJr9LYr0F69blmmMwk1l0OQzOZ2xNBdIgmXHfmaoW.Mf3bHoKsFQE1J5Hsaa4xjB+VRhjFfzVcOg6nV8DGyih+kr.1A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FiQ.5t5QxIrmu33.pO5ftSTWdsaCg+OpbXRZ+Xq+9Yu+rYstgx7e9gyBMGxDq7.M8vUOoUTp5HwwpY9TrzeHM2TWVmLfvCfg1.i.nwF1WERGBrFLNlPwe8ufFPMIK37MKLIHJgy6ylbjvG.uRI8YbVaX+HHnxYyHaQF9EEo1Tc1D340QqFJjeyOpj6S1gx9afUTHz4Ev9d5UEtC8HxY0VWcgBic.r1LhXqDpF3R4njW3vWEA2WV3de8FLoSu4i2UlCdgkPesw63quXccqNcfcoiA6p51u5q+cUffSHTqiqRj9LXYrNLqqErFxgpdkHNb5CXSaE01KQ0KnpqXlVTtaXkyfxXmEU00F6r3Dmn9DGewach1pTcAIeSnE.S7v6IZM8pp53hnvsOg7zKju.pOyk8VGGEU7..6yOmMtB4r4UHmGcEx4GuB4r0UHmGeEx4IWZNpqLyXnTzOZYBXngU3NoZZVbBLKKbFI5eAgRJaMA
    


  • @Natan Thanks sir



  • @Natan That is great @natan. Your explanation for beginners (like me) is excellent. I asked on my first post How to add Vector icons instead ADD,RENAME etc. In this post you have cleared my confusion. Everybody here is great but most of them do not explain like you. I guess my Questions(most of the posts) might sound like a nursery standard student's so it is difficult to answer for a Ph.d Professor. 😉



  • @Natan said in Preset Browser LaF:

    @Jay @MikeB @Matt_SF
    These Are All The Dialogue Buttons I Discovered So Far

    You Can Also Add Your Own Custom SVG Icons Instead Of The Button Names Aswell.
    Just Use g.fillPath(YourSVGIconNameHere,obj.are);

    I guess it is

    Obj.area   
    

    Right?



  • @DabDab Yup 🙂



  • @DabDab said in Preset Browser LaF:

    @Natan That is great @natan. Your explanation for beginners (like me) is excellent. I asked on my first post How to add Vector icons instead ADD,RENAME etc. In this post you have cleared my confusion. Everybody here is great but most of them do not explain like you. I guess my Questions(most of the posts) might sound like a nursery standard student's so it is difficult to answer for a Ph.d Professor. 😉

    Your welcome Mate, glad to help 🙏



  • @Natan Two more Dialogue Buttons

        else if (obj.text == "Clear MIDI CC")
        {
            g.setColour(0XFF3f3f3f);
            g.fillRoundedRectangle(obj.area,2);
            
            g.setColour(0XFFDADADA);
            obj.over ? g.setColour(0xFFF9F9F9): "";
            g.setFont("Arial", 14);
            g.drawAlignedText("CLEAR MIDI CC", obj.area, "centred");
        }  
        
        
        else if (obj.text == "Toggle Debug Mode")
        {
            g.setColour(0XFF3f3f3f);
            g.fillRoundedRectangle(obj.area,2);
            
            g.setColour(0XFFDADADA);
            obj.over ? g.setColour(0xFFF9F9F9): "";
            g.setFont("Arial", 14);
            g.drawAlignedText("DEBUG MODE", obj.area, "centred");
        }
    


  • @DabDab Great👏🏻



  • This post is deleted!

Log in to reply
 

11
Online

1.5k
Users

4.6k
Topics

42.1k
Posts