HISE Logo Forum
    • Categories
    • Register
    • Login

    Customizing combo boxes - how?

    Scheduled Pinned Locked Moved General Questions
    28 Posts 5 Posters 1.6k 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.
    • Christoph HartC
      Christoph Hart
      last edited by

      There you go:

      Link Preview Image
      HISE | Docs

      favicon

      (docs.hise.audio)

      T 1 Reply Last reply Reply Quote 3
      • T
        tomekslesicki @Christoph Hart
        last edited by

        @Christoph-Hart awesome, thanks so much!

        1 Reply Last reply Reply Quote 0
        • T
          tomekslesicki
          last edited by tomekslesicki

          It's super awesome, but the only thing I can't get to work properly on this window is the font of the main text - it works fine on the headers. It works for fonts that are installed in the system like the mighty Comic Sans, but when I want to load a custom font from the images folder it doesn't work:

          obj.font = "MyFont";
          

          I've loaded the font previously with:

          Engine.loadFontAs("{PROJECT_FOLDER}Fonts/MyFont.ttf", "MyFont");
          Engine.setGlobalFont("MyFont");
          

          Should I add it somehow else so that the obj.font can see it? It doesn’t work with the laf global font class either.

          And one more thing - if I got rid of the icons, how can I center text to the center of the box?

          1 Reply Last reply Reply Quote 0
          • T
            tomekslesicki
            last edited by

            @Christoph-Hart ?

            1 Reply Last reply Reply Quote 0
            • T
              tomekslesicki
              last edited by tomekslesicki

              It would also be amazing to be able to specify the height of the menu items to customize the vertical spacing between items! Or is it possible already?

              1 Reply Last reply Reply Quote 0
              • T
                tomekslesicki
                last edited by

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

                  Hey @Christoph-Hart, I noticed you added the fix to the font problem in the latest version, thank you!

                  In case anyone else was wondering about the height of the right-click popups and menu items, look at line 242 in HI_LookAndFeels.h file. You can change the height multiplier there.

                  1 Reply Last reply Reply Quote 0
                  • T
                    tomekslesicki
                    last edited by

                    The last question is - how to center the text box of the alert window if there's no icon? I guess it should be doable in one of the .cpp files but I'd really appreciate some direction as to where to look for it :-)

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

                      I've changed it so that if you want to not use any icon at all, just set the obj.type property to -1 in the script lookandfeel createIcon() method

                      1 Reply Last reply Reply Quote 1
                      • T
                        tomekslesicki
                        last edited by

                        Ok, I'm a little lost. Should I call it in the script editor or modify some file?

                        Dan KorneffD 1 Reply Last reply Reply Quote 0
                        • Dan KorneffD
                          Dan Korneff @tomekslesicki
                          last edited by

                          @tomekslesicki Some examples are in the link posted. Have you checked those out yet?
                          https://docs.hise.audio/glossary/custom_lookandfeel.html#alert-windows

                          Dan Korneff - Producer / Mixer / Audio Nerd

                          1 Reply Last reply Reply Quote 1
                          • T
                            tomekslesicki
                            last edited by tomekslesicki

                            Yeah, I tried:

                            laf.registerFunction("drawAlertWindowIcon", function(g, obj)
                            {
                                obj.type = -1;
                            });
                            

                            But it doesn't work unfortunately.

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

                              Have you pulled the latest version? I‘ve added this just now.

                              1 Reply Last reply Reply Quote 0
                              • T
                                tomekslesicki
                                last edited by

                                Yeah, my bad, didn't download both updated files... Sorry for that. It's kind of close now, but not there yet, I think?

                                Annotation 2020-07-30 182314.jpg

                                I'd like the margins on both sides (left & right) to be the same. With the icon previously it was offset to the right. Now it's to the left.

                                1 Reply Last reply Reply Quote 0
                                • T
                                  tomekslesicki
                                  last edited by

                                  I can experiment with this myself, just tell me where to look for it in the source files.

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

                                    Search for MessageWithIcon ;)

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      tomekslesicki
                                      last edited by

                                      If anybody would like to change that, too, please, look at line 2904 in PresetHandler.cpp file:

                                      b.removeFromLeft(img.getWidth() - X);
                                      

                                      The X bit should be a number, it offsets the text to the right by the amount of pixels you specify.

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

                                      26

                                      Online

                                      1.7k

                                      Users

                                      11.9k

                                      Topics

                                      103.3k

                                      Posts