HISE Logo Forum
    • Categories
    • Register
    • Login

    Get the size of the screen displaying the plugin...

    Scheduled Pinned Locked Moved Feature Requests
    9 Posts 3 Posters 512 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.
    • LindonL
      Lindon
      last edited by

      Its in JUCE as part of Desktop

      Obtainable (apparently) like this:

      Rectangle<int> r = Desktop::getInstance().getDisplays().getMainDisplay().userArea;
      	int x = r.getWidth();
      	int y = r.getHeight();
      

      HISE Development for hire.
      www.channelrobot.com

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

        88e03dc1-8b30-4358-8970-761eff69d103-image.png

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

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

          @d-healey waahhh!!! <--my new proposed design for the t-shirt...

          HISE Development for hire.
          www.channelrobot.com

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

            @d-healey said in Get the size of the screen displaying the plugin...:

            88e03dc1-8b30-4358-8970-761eff69d103-image.png

            ..except........

            Engine.getDeviceResolution() is reporting a size of:

            Interface: [
              0,
              0,
              1024,
              768
            ]
            

            but my screens are

            6bf1642a-b8e4-4248-a0ca-b5690d571a07-image.png

            So I'm doing something wrong...or its a bug.

            HISE Development for hire.
            www.channelrobot.com

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

              @Lindon Reports the same for me. What about if you compile the project?

              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 same ---

                HISE Development for hire.
                www.channelrobot.com

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

                  There's ya problem

                  180728d8-460a-4173-aaaf-1f0b48c0acad-image.png

                  @Christoph-Hart Does this mean it is only for tablets or something?

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

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

                    Just in case anyone else need this, the function is Settings.getUserDesktopSize()

                    var ScriptingApi::Settings::getUserDesktopSize()
                    {
                    	auto area = Desktop::getInstance().getDisplays().getMainDisplay().userArea;
                    
                    	Array<var> desktopSize;
                    
                    	desktopSize.add(area.getWidth());
                    	desktopSize.add(area.getHeight());
                    
                    	return desktopSize;
                    }
                    

                    Dan Korneff - Producer / Mixer / Audio Nerd

                    LindonL 1 Reply Last reply Reply Quote 3
                    • LindonL
                      Lindon @Dan Korneff
                      last edited by

                      @Dan-Korneff nice. Well done.

                      HISE Development for hire.
                      www.channelrobot.com

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

                      30

                      Online

                      1.8k

                      Users

                      12.0k

                      Topics

                      104.1k

                      Posts