HISE Logo Forum
    • Categories
    • Register
    • Login

    change size of "Add preset" window

    Scheduled Pinned Locked Moved General Questions
    22 Posts 2 Posters 1.0k 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 @treynterrio
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • T
        treynterrio @treynterrio
        last edited by

        @treynterrio this works for me now but how could I change the "Add new User Preset" to 2Add new Preset" and change the "enter the name"?

        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(0XFF999897);
           	g.setFont("Arial", 20.0);
           g.drawAlignedText(obj.title, removeFromTop(obj.area,1), "centred");
           g.setColour(0XFF999897);
           	g.setFont("Arial", 13.0);
           g.drawAlignedText(obj.text, removeFromTop(obj.area, 40), "centred");
           
        });
        
        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @treynterrio
          last edited by

          @treynterrio You can't change that stuff. You'd need to create you own system.

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          T 2 Replies Last reply Reply Quote 0
          • T
            treynterrio @d.healey
            last edited by

            @d-healey I can change everything the "Add" the "Ok" the "Cancel" but I can't change these?

            d.healeyD 1 Reply Last reply Reply Quote 0
            • T
              treynterrio @d.healey
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @treynterrio
                last edited by

                @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.

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

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

                  @d-healey is there a way to lay a Label over the Add new User Preset to Display my own text?

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @treynterrio
                    last edited by

                    @treynterrio no, but you can change the text with laf i think. Probably one of the alert window functions

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    T 2 Replies Last reply Reply Quote 0
                    • T
                      treynterrio @d.healey
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • T
                        treynterrio @d.healey
                        last edited by

                        @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

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @treynterrio
                          last edited by

                          @treynterrio Post a minimal snippet

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

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

                            @d-healey the first inline function is for the Add new User Preset Window

                            HiseSnippet HiseSnippet 1672.3oc4YstaaaCEVJMZa1qasEXO.B9WNntF1NoIwMHnwWKLpShgsSWABBJXjns4BMoAEctrgf8trmj8m8drGg8FrcnnrrrisxstgBLEzDoyExuyGOjRmSaI3NXOOtvvLQ2qFgMLepUmqXxAUFfHLiFUMLehUdixWMB44gcMLMex6TJLSrpg+0e81xHJh4fmJxv3CbhCtIYHQNUZq8dOgRqibwcICiX8F60vgypvo7wB0jkyXDx4LTe7AHkYqXYX9U0bIRtniDIwdFlVk4tW0Y.+Bl19OP7HmRwZj1AFHs35bpqBwJoGdNVbNAeQTYFUFPntslP.dFFlq1ZJc7DMc7CV6SbIgxmRKO2Wg8TOhxQlqLKjWcFHmOJjysPHm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nffYU74DGrt37DVUwdmI4i7sc3HNSMBlOSFzYA8mpWmxQRBqeWB.UBTm9yrlotFiKCaVxu2duqfvzbK39KHtxAgZ9yecuAXR+ASa3xdi1K.eZvL+ndZ+I8b4oVaTXqsyWLWtsyYPfJnhpn3FE2bqBEecDEElyEe5XkeaEK01lTJZUchQPEEuwtGB1vkYhpZWNBw7fkWuRdvvMd3MMwuKHhk3uJOy6liJjGncPoSJFqUMULjZp9lk2XmKzG3yYBmiPOTJZiYngKC+5hAVri0QmyE.OoZn0LNF.sFPf6hKyEP3Mi9CFOTyEJzmOb75fQBmAkQyZr1xeTs72FRb3fxi82tlK65yck4dJGDeh+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
                            
                            d.healeyD 1 Reply Last reply Reply Quote 0
                            • d.healeyD
                              d.healey @treynterrio
                              last edited by

                              @treynterrio I can't open the snippet. Which commit of HISE are you using?

                              Libre Wave - Freedom respecting instruments and effects
                              My Patreon - HISE tutorials
                              YouTube Channel - Public HISE tutorials

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

                                @d-healey said in change size of "Add preset" window:

                                Which commit of HISE are you using?

                                3.6.2

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

                                  @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");
                                  });
                                  
                                  
                                  d.healeyD 1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @treynterrio
                                    last edited by

                                    @treynterrio I think you need to be using the alert window laf functions to change the window's text

                                    Libre Wave - Freedom respecting instruments and effects
                                    My Patreon - HISE tutorials
                                    YouTube Channel - Public HISE tutorials

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

                                      @d-healey I've tried all of these laf functions but nothing changed

                                      d.healeyD 1 Reply Last reply Reply Quote 0
                                      • d.healeyD
                                        d.healey @treynterrio
                                        last edited by

                                        @treynterrio Show me the code you've tried

                                        Libre Wave - Freedom respecting instruments and effects
                                        My Patreon - HISE tutorials
                                        YouTube Channel - Public HISE tutorials

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

                                          @d-healey I tried everything from here:

                                          Link Preview Image
                                          HISE | Docs

                                          favicon

                                          (docs.hise.audio)

                                          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");
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • d.healeyD
                                            d.healey
                                            last edited by

                                            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");
                                            });
                                            

                                            Libre Wave - Freedom respecting instruments and effects
                                            My Patreon - HISE tutorials
                                            YouTube Channel - Public HISE tutorials

                                            T 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            23

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts