HISE Logo Forum
    • Categories
    • Register
    • Login

    Is there a way to get the bounds of the front interface?

    Scheduled Pinned Locked Moved General Questions
    9 Posts 3 Posters 84 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.
    • VirtualVirginV
      VirtualVirgin
      last edited by

      I would like to position some things based on the front interface size so I can resize from a template.
      Is there a .get to do that?

      You can listen to my orchestral mockups here:
      https://www.virtualvirgin.net/

      d.healeyD ustkU 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @VirtualVirgin
        last edited by

        @VirtualVirgin Nope, but it has been requested a few times. Currently the best you can do is store your UI width and height in a constant.

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

        1 Reply Last reply Reply Quote 0
        • ustkU
          ustk @VirtualVirgin
          last edited by

          @VirtualVirgin Yeah like Dave, I always start my interface script this way:

          const var INTERFACE_WIDTH = 1000; const var INTERFACE_HEIGHT = 623;
          Content.makeFrontInterface(INTERFACE_WIDTH, INTERFACE_HEIGHT);
          

          So this can be used everywhere

          Can't help pressing F5 in the forum...

          d.healeyD VirtualVirginV 2 Replies Last reply Reply Quote 1
          • d.healeyD
            d.healey @ustk
            last edited by

            @ustk You know it would be easy to add this... should I add separate getWidth/getHeight functions, or just a getInterfaceSize function that returns both? I'm thinking the latter.

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

            ustkU 1 Reply Last reply Reply Quote 1
            • ustkU
              ustk @d.healey
              last edited by

              @d-healey The three 🤓

              Can't help pressing F5 in the forum...

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

                @ustk The API has a limit on how many functions can be added per class, so I think the one is the way to go :)

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

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

                  Tis done - https://github.com/christophhart/HISE/pull/642

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

                  ustkU 1 Reply Last reply Reply Quote 2
                  • ustkU
                    ustk @d.healey
                    last edited by

                    @d-healey yeah perfect again friend Dave 😎

                    Can't help pressing F5 in the forum...

                    1 Reply Last reply Reply Quote 1
                    • VirtualVirginV
                      VirtualVirgin @ustk
                      last edited by

                      @ustk said in Is there a way to get the bounds of the front interface?:

                      @VirtualVirgin Yeah like Dave, I always start my interface script this way:

                      const var INTERFACE_WIDTH = 1000; const var INTERFACE_HEIGHT = 623;
                      Content.makeFrontInterface(INTERFACE_WIDTH, INTERFACE_HEIGHT);
                      

                      So this can be used everywhere

                      Thanks :) I just added this and it does what I needed.

                      You can listen to my orchestral mockups here:
                      https://www.virtualvirgin.net/

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

                      11

                      Online

                      1.7k

                      Users

                      11.8k

                      Topics

                      103.1k

                      Posts