Difference between Engine.setZoomLevel and Settings.setZoomLevel?
-
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 -
@Oli-Ullmann It's the same thing. I reckon the one in the
Settings
API has been added here to reduce the size ofEngine
which became very big over time. It probably hasn't been removed for old project compatibility reason (or just an omission) -
@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?
-
@ustk Ah, the console tells me the following:
"Engine.setZoomLevel() is deprecated. Use Settings.setZoomLevel() instead." -
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.
-
Why? 50% is the new 100% :)
Did someone make their UI too big?!
-
@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 -
@DanH Ha ha exactly! :-)
-
@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);