HISE Logo Forum
    • Categories
    • Register
    • Login

    Preset browser LAF Dialog modal

    Scheduled Pinned Locked Moved General Questions
    10 Posts 2 Posters 330 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.
    • hisefiloH
      hisefilo
      last edited by hisefilo

      Hi mates, is there a function to control the preset browser modals LAF?
      registerFunction("drawModalOverlay" does not seems to be the one.
      Any tip??

      const var browserLaf = Content.createLocalLookAndFeel();
      const var presetsFloatingTile = Content.getComponent("presetsFloatingTile");
      
      
      browserLaf.registerFunction("drawModalOverlay", function(g, obj)
      {	
          g.setColour(Colours.red);
          g.fillAll();
      
      
       });
      

      Screenshot 2024-12-23 at 16.19.26.png

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

        @hisefilo https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/branch/main/includes/LookAndFeel.js#L724

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

        hisefiloH 2 Replies Last reply Reply Quote 0
        • hisefiloH
          hisefilo @d.healey
          last edited by

          @d-healey thanks mate!!!

          1 Reply Last reply Reply Quote 0
          • hisefiloH
            hisefilo @d.healey
            last edited by

            @d-healey ... LOL coming back!!

            Can't figure out access to this guy:

            Screenshot 2024-12-23 at 17.56.21.png

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

              @hisefilo What do you want to do with it?

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

              hisefiloH 1 Reply Last reply Reply Quote 0
              • hisefiloH
                hisefilo @d.healey
                last edited by

                @d-healey move it up. is obj.text but is not listening to me. maybe is an object pushing it down

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

                  @hisefilo show me your laf

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

                  hisefiloH 1 Reply Last reply Reply Quote 0
                  • hisefiloH
                    hisefilo @d.healey
                    last edited by

                    @d-healey

                    const var browserLaf = Content.createLocalLookAndFeel();
                    const var presetsFloatingTile = Content.getComponent("presetsFloatingTile");
                    
                    
                    
                    
                     browserLaf.registerFunction("drawPresetBrowserDialog", function(g, obj)
                        {
                            var a = obj.area;
                            var la = obj.labelArea;
                            var h = 90;
                            
                    //        g.drawDropShadow([a[0] - 50, a[1] - 50, a[2] + 100, a[3] + 100], Colours.withAlpha(Colours.black, 0.8), 20);
                    
                    		//g.setColour(0xff2F2F34);
                    		g.setColour(0xff323232);
                    		g.fillRect([a[0] - 50, a[1] - 90, a[2] + 90, a[3] + 150]);
                                    
                            //g.setColour(0xff161619);
                            //g.setColour(Colours.blue);
                            //g.fillRect([a[0] - 50, a[1] - 0, a[2] + 100, h]);
                    
                    
                            
                            g.setFont("Abel", 24);
                            g.setColour(Colours.white);
                            g.drawAlignedText(obj.title, [a[0] - 30, a[1] - 50, a[2] + 70, 20], "centred");
                            
                            if (obj.text){
                    	        g.setFont("Abel", 24);
                    	        g.setColour(Colours.red);
                    	        g.drawAlignedText(obj.text, [a[0] + 10, a[1] + h + 10, a[2] - 20, a[3] - h - 200], "right");
                            }
                    
                            
                            //g.setColour(Colours.withAlpha(Colours.white, 0.3));
                            //g.drawRect([a[0] - 50, a[1] - 50, a[2] + 100, a[3] + 100], 1);
                    
                            g.setFont("Abel", 18);
                            g.setColour(Colours.white);
                    
                            if (obj.labelArea[2] != 0)
                            {
                                g.drawAlignedText(obj.text, [a[0], a[1] + 15, a[2], 20], "centred");
                                g.setColour(0xff161619);
                                g.fillRoundedRectangle([la[0] - 5, la[1], la[2] + 10, la[3]], 5);
                            }
                            else
                            {
                                g.drawAlignedText(obj.text, [a[0], a[1] + 40, a[2], 20], "centred");
                            }
                        });
                    
                    presetsFloatingTile.setLocalLookAndFeel(browserLaf);
                    
                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @hisefilo
                      last edited by

                      @hisefilo you're drawing obj.text in two places, is that intentional?

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

                      hisefiloH 1 Reply Last reply Reply Quote 0
                      • hisefiloH
                        hisefilo @d.healey
                        last edited by

                        @d-healey No, is that I'm just an idiot LOL. Thanks mate. To many hours in front of my computer... I need a break

                        Screenshot 2024-12-23 at 18.09.16.png

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

                        19

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.5k

                        Posts