HISE Logo Forum
    • Categories
    • Register
    • Login

    LAF- Alert Window: customize text and icon

    Scheduled Pinned Locked Moved General Questions
    10 Posts 2 Posters 238 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.
    • gorangroovesG
      gorangrooves
      last edited by

      Hey guys,
      has anyone successfully customized the icon and text within the alert windows?

      I can style the title and background of the whole window, but the styling of the actual prompt text is not responding to commands explained in the Docs
      https://docs.hise.audio/glossary/custom_lookandfeel.html#alert-windows

      The dialog text stays white, which is not good since my background is white.

      I have the latest commit of HISE as of an hour ago.

      Thank you.

      Goran Rista
      https://gorangrooves.com

      Handy Drums and Handy Grooves
      https://library.gorangrooves.com

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

        Did you try this one?

            laf.registerFunction("getAlertWindowMarkdownStyleData", function(obj)
            {		
                obj.font = "medium";
                obj.fontSize = 18;
                obj.textColour = Colours.red;
                return obj;
            });
        

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

        gorangroovesG 1 Reply Last reply Reply Quote 0
        • gorangroovesG
          gorangrooves @d.healey
          last edited by

          @d-healey Thanks, Dave. I see what was wrong. I had specified the color within (Colours.red), while you had it with just Colours.red.
          So, you solved that. Thank you.

          Do you have an icon script that works? I copied the one off the docs to test it, but it is not showing. It just disappears the default one.

          Goran Rista
          https://gorangrooves.com

          Handy Drums and Handy Grooves
          https://library.gorangrooves.com

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

                laf.registerFunction("drawAlertWindowIcon", function(g, obj)
                {
                    var a = obj.area;
                    var path = Paths.icons[obj.type];
            
            	g.setColour(Colours.red);
            	g.fillPath(path, a);
                });
            

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

            gorangroovesG 1 Reply Last reply Reply Quote 0
            • gorangroovesG
              gorangrooves @d.healey
              last edited by

              @d-healey What else am I missing there?

              What is

              Paths.icons[obj.type];
              

              referencing here?

              Goran Rista
              https://gorangrooves.com

              Handy Drums and Handy Grooves
              https://library.gorangrooves.com

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

                @gorangrooves

                I have a namespace called Paths, inside I have an object called icons in which I add my path objects. I have a path with the name of each alert type: Paths.icons.warning, Paths.icons.error, etc.

                I wrote about this in the docs - https://docs.hise.audio/scripting/scripting-in-hise/hise-script-coding-standards.html#svg-paths

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

                gorangroovesG 2 Replies Last reply Reply Quote 0
                • gorangroovesG
                  gorangrooves @d.healey
                  last edited by

                  @d-healey Thank you. I understand. I think you mentioned this in one of your videos. I will check out the documentation.

                  Goran Rista
                  https://gorangrooves.com

                  Handy Drums and Handy Grooves
                  https://library.gorangrooves.com

                  1 Reply Last reply Reply Quote 1
                  • gorangroovesG
                    gorangrooves @d.healey
                    last edited by

                    @d-healey You have a little typo in the doc. After the SVG array, you are missing

                    ;
                    

                    I wrote about this in the docs - https://docs.hise.audio/scripting/scripting-in-hise/hise-script-coding-standards.html#svg-paths

                    Goran Rista
                    https://gorangrooves.com

                    Handy Drums and Handy Grooves
                    https://library.gorangrooves.com

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

                      @gorangrooves Thanks, I've fixed it now.

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

                      gorangroovesG 1 Reply Last reply Reply Quote 1
                      • gorangroovesG
                        gorangrooves @d.healey
                        last edited by

                        @d-healey Thanks, Dave!

                        Goran Rista
                        https://gorangrooves.com

                        Handy Drums and Handy Grooves
                        https://library.gorangrooves.com

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

                        46

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts