HISE Logo Forum
    • Categories
    • Register
    • Login

    Preset Browser LAF (Add + Delete) Text

    Scheduled Pinned Locked Moved Unsolved General Questions
    3 Posts 1 Posters 67 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      treynterrio
      last edited by treynterrio

      Hi there, I'm struggling to set the Text in my Preset Folder when I click Add (Enter Preset Name) and/or Delete (Do you really want to delete this preset?)

      I've managed to change it BUT it says on both Enter Preset Name or when I delete it it shows nothing.

      Here is an example:

      ScreenFlow.gif

      ScreenFlowq.gif

      Does anyone know how I can fix this?

      T 2 Replies Last reply Reply Quote 0
      • T treynterrio marked this topic as a question on
      • T
        treynterrio @treynterrio
        last edited by treynterrio

        @treynterrio I have made the two sentences visible again but I still don't understand in which obj.area (Are you sure you want to delete this file ?) is located

        Screenshot 2025-03-07 at 10.21.50.png Screenshot 2025-03-07 at 10.21.57.png

        1 Reply Last reply Reply Quote 0
        • T
          treynterrio @treynterrio
          last edited by treynterrio

          @treynterrio here is the code I've used where I get Enter Preset Name on both options (Add + Delete)

          laf.registerFunction("drawPresetBrowserDialog", function(g, obj)
              {
                  var a = obj.area;
                  var la = obj.labelArea;
                  var h = 40;
                 
          		g.setColour(0xFF000000);
          		g.fillRect([a[0] - 50, a[1] - 25, a[2] + 100, a[3] + 50]);
                          
                  g.setFont("arial", 13);
                  g.setColour(0xFF000000);
          	    g.drawAlignedText("", [a[0], 50, a[2], 25], "centred");
          
                  if (obj.labelArea[2] != 0)
                  {
                      g.setColour(0xFFFFFFFF);
                      g.fillRoundedRectangle([la[0] - 0, la[1], la[2] + 0, la[3]], 0);
                  }
                  else
                  {
                      g.drawAlignedText(obj.text, [a[0], a[1] + 40, a[2], 20], "centred");
                  }
             g.fillAll(noColour);
             g.setColour(0xFF000000);
             g.fillRoundedRectangle(obj.area, 0.0);
             g.setColour(0xFF141414);
             g.fillRoundedRectangle(obj.labelArea, 0.0);
             g.setColour(0xFFFFFFFF);
             g.setFont("Arial",16);
             g.drawAlignedText("Enter Preset Name :", removeFromTop(obj.area, 40), "centred");
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          15

          Online

          1.7k

          Users

          11.8k

          Topics

          102.4k

          Posts