HISE Logo Forum
    • Categories
    • Register
    • Login

    Difference between Engine.setZoomLevel and Settings.setZoomLevel?

    Scheduled Pinned Locked Moved General Questions
    9 Posts 4 Posters 381 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.
    • Oli UllmannO
      Oli Ullmann
      last edited by

      As the title says - is there a difference between "Engine.setZoomLevel" and "Settings.setZoomLevel"?
      Unfortunately, I can't find anything in the documentation.

      Many thanks for info! :-)

      All the best
      Oli

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

        @Oli-Ullmann It's the same thing. I reckon the one in the Settings API has been added here to reduce the size of Engine which became very big over time. It probably hasn't been removed for old project compatibility reason (or just an omission)

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

        Oli UllmannO 2 Replies Last reply Reply Quote 1
        • Oli UllmannO
          Oli Ullmann @ustk
          last edited by

          @ustk Thank you for your answer. If no "GeneralSettings.xml" file exists, I would like to set the user interface to 50% when loading the plug-in. If I understand you correctly, I can use both the "Engine" and the "Settings" variant for this, correct?

          1 Reply Last reply Reply Quote 0
          • Oli UllmannO
            Oli Ullmann @ustk
            last edited by

            @ustk Ah, the console tells me the following:
            "Engine.setZoomLevel() is deprecated. Use Settings.setZoomLevel() instead."

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

              I would like to set the user interface to 50% when loading the plug-in.

              Why? 50% is the new 100% :)

              "Engine.setZoomLevel() is deprecated. Use Settings.setZoomLevel() instead."

              Yes, that's just a hint that you shouldn't use the Engine API method anymore. I might remove that function sometime in the future.

              DanHD Oli UllmannO 3 Replies Last reply Reply Quote 2
              • DanHD
                DanH @Christoph Hart
                last edited by

                Why? 50% is the new 100% :)

                Did someone make their UI too big?! 😆

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

                Oli UllmannO 1 Reply Last reply Reply Quote 1
                • Oli UllmannO
                  Oli Ullmann @Christoph Hart
                  last edited by Oli Ullmann

                  @Christoph-Hart Ha ha :-) Not really. :-)

                  Unfortunately, the user interface is too big on smaller devices. I have read that it should scale automatically, but with a Mac Book 13" under Sonoma 14.1 this does not work.

                  Therefore, it should scale automatically if no GeneralSettings.xml has been created yet.

                  Unfortunately, I can't get to the right directory. I use the FileSystem API and thought that the XML file was in the AppData directory. Apparently not. Any idea how I can check whether the file already exists? For a compiled VST / AU plug-in.

                  This ist the code I am using. Or am I making a mistake?

                  const appData = FileSystem.getFolder(FileSystem.AppData);
                  const usoFolder = appData.getChildFile("Ullmann Synth One");
                  const settingsFile = usoFolder.getChildFile("GeneralSettings.xml");
                  
                  if(appData.isDirectory() && usoFolder.isDirectory() && settingsFile.isFile())
                  	Console.print("General Settings vorhanen");
                  else
                  	Settings.setZoomLevel(0.5);
                  

                  Many thanks
                  Oli

                  1 Reply Last reply Reply Quote 0
                  • Oli UllmannO
                    Oli Ullmann @DanH
                    last edited by

                    @DanH Ha ha exactly! :-)

                    1 Reply Last reply Reply Quote 0
                    • Oli UllmannO
                      Oli Ullmann @Christoph Hart
                      last edited by

                      @Christoph-Hart Ok, now it works. Thank you!

                      const appData = FileSystem.getFolder(FileSystem.AppData);
                      const settingsFile = appData.getChildFile("GeneralSettings.xml");
                      
                      if(settingsFile.isFile())
                      	Console.print("General Settings vorhanen");
                      else
                      	Settings.setZoomLevel(0.75);
                      
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      19

                      Online

                      1.7k

                      Users

                      11.8k

                      Topics

                      102.5k

                      Posts