HISE Logo Forum
    • Categories
    • Register
    • Login

    Preset Browser (doesn't follow preset)

    Scheduled Pinned Locked Moved General Questions
    14 Posts 6 Posters 458 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.
    • DanHD
      DanH
      last edited by

      Hi guys,

      So I'm using the standard Preset Browser and 'previous / next' buttons to flick through presets. The browser doesn't 'follow' the presets when I've flicked through the list, further down the window/panel.

      Does anyone know if it's possible for the list to move with the buttons, so to speak?

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

      ? LindonL 2 Replies Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        Content.makeFrontInterface(500, 400);
        
        namespace UserPresetWidgets
        {
        	inline function createPresetButton(name, x, y, up)
        	{
        		local widget = Content.addPanel(name, x, y);
            
        		Content.setPropertiesFromJSON(name, {
        		"width": 10,
        		"height": 15,
        		"saveInPreset": false,
        		"allowCallbacks": "Clicks & Hover"
        		});
            
        		widget.data.up = up;
            
        		widget.setPaintRoutine(function(g)
        		{
        			g.setColour(this.data.hover ? 0xFF65B17c : 0xFF2C4433);
        			g.fillTriangle([0, 0, this.getWidth(), this.getHeight()], this.data.up ? Math.PI/2 : 1.5 * Math.PI);
        		});
            
        		widget.setMouseCallback(function(event)
        		{
        			this.data.hover = event.hover;
            	
        			if(event.clicked)
        			{
        				if(this.data.up)
        					Engine.loadNextUserPreset(true);
        				else
        					Engine.loadPreviousUserPreset(true);		
        			}
            	
        			this.repaint();
        		});
        		return widget;
        	};
        
        	inline function createPresetDisplay(name, x, y)
        	{
        		local widget = Content.addPanel(name, x, y);
            
        		Content.setPropertiesFromJSON(name, {
        		"width": 280,
        		"height": 25,
        		});
            
            
        		widget.setPaintRoutine(function(g)
        		{
        			g.fillAll(this.data.hover ? 0xFF252526 : 0xff363636);
        			g.setColour(0xAA212121);
        			g.drawRect([0, 0, this.getWidth(), this.getHeight()], 2);
        			g.setFont("Montserrat", 21.0);
        			g.setColour(0xFF65B17C);
            	
        			g.drawAlignedText(Engine.getCurrentUserPresetName(), [5, 0, this.getWidth(), this.getHeight()], "centred");
        		});
            
        		widget.setTimerCallback(function()
        		{
        			this.repaint();
        		});
            
        		widget.startTimer(300);
        	
            
        		widget.setMouseCallback(function(event)
        		{
        			this.data.hover = event.hover;
        			this.repaint();
        		});
        		return widget;
        	};
        
        }
        
        
        const var UpButton = UserPresetWidgets.createPresetButton("UpButton", 442, 11, true);
        const var DownButton = UserPresetWidgets.createPresetButton("DownButton", 421, 11, false);
        const var PresetDisplay = UserPresetWidgets.createPresetDisplay("PresetDisplay", 130, 5);
        Engine.loadNextUserPreset(1);
        
        1 Reply Last reply Reply Quote 0
        • ?
          A Former User @DanH
          last edited by

          @DanH Are you looking something to change presets by button?

          DanHD 1 Reply Last reply Reply Quote 0
          • DanHD
            DanH @A Former User
            last edited by

            @Rudra-Ghosh No, I'm already doing that, I'll post a vid later on to explain it properly :face_with_tears_of_joy:

            DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
            https://dhplugins.com/ | https://dcbreaks.com/
            London, UK

            1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @DanH
              last edited by

              @DanH do you mean you move thru the presets with your button - but in the browser the current preset isnt highlighted?

              if so I dont think theres a way to fix that.

              HISE Development for hire.
              www.channelrobot.com

              DanHD 1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @Lindon
                last edited by DanH

                @Lindon Yes that's what I mean :) thanks!

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

                1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart
                  last edited by

                  Actually it should update the browser list automatically.

                  d.healeyD DanHD 2 Replies Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @Christoph Hart
                    last edited by

                    @Christoph-Hart said in Preset Browser (doesn't follow preset):

                    Actually it should update the browser list automatically.

                    Yeah, seems to work here in the latest scriptnode.

                    Peek 2021-03-13 13-14.gif

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

                    LindonL 1 Reply Last reply Reply Quote 0
                    • LindonL
                      Lindon @d.healey
                      last edited by

                      @d-healey I stand corrected!

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 0
                      • DanHD
                        DanH @Christoph Hart
                        last edited by

                        @Christoph-Hart Sorry I've confused things, here's a vid of what I mean:

                        test3.gif

                        So the highlighted / selected Preset isn't visible outside of the Panel. Would be nice if the list moves with the selection.

                        Does that make sense?!

                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                        https://dhplugins.com/ | https://dcbreaks.com/
                        London, UK

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

                          @DanH You mean you want the list to auto-scroll, sound like a good idea to me.

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

                          LindonL DanHD S 3 Replies Last reply Reply Quote 0
                          • LindonL
                            Lindon @d.healey
                            last edited by

                            @d-healey yep - my vote too...

                            HISE Development for hire.
                            www.channelrobot.com

                            1 Reply Last reply Reply Quote 0
                            • DanHD
                              DanH @d.healey
                              last edited by DanH

                              @d-healey auto-scroll... that's what I mean lol - @Christoph-Hart any chance?

                              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                              https://dhplugins.com/ | https://dcbreaks.com/
                              London, UK

                              1 Reply Last reply Reply Quote 0
                              • S
                                Sawer @d.healey
                                last edited by Sawer

                                @Lindon Here's the thread I just found now regarding the auto- scroll issue I meant. Hope it is clearer now. And looks like it's sill a bug.

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

                                58

                                Online

                                1.7k

                                Users

                                11.7k

                                Topics

                                101.9k

                                Posts