2
0
Fork 0

GUI scaling

This commit is contained in:
George Reales 2020-05-16 20:44:21 +02:00
parent 4fb23ee532
commit af7d5ab1f6
4 changed files with 335 additions and 405 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="wUKQiT" name="OPL" projectType="audioplug" version="1.1.1" <JUCERPROJECT id="wUKQiT" name="OPL" projectType="audioplug" version="1.2.0"
bundleIdentifier="com.discodsp.OPL" pluginName="OPL" pluginDesc="Digital sound synthesis chip developed by Yamaha in the mid 1980s" bundleIdentifier="com.discodsp.OPL" pluginName="OPL" pluginDesc="Digital sound synthesis chip developed by Yamaha in the mid 1980s"
pluginManufacturer="discoDSP" pluginManufacturerCode="DDSP" pluginCode="OPL1" pluginManufacturer="discoDSP" pluginManufacturerCode="DDSP" pluginCode="OPL1"
pluginChannelConfigs="{0, 2}" pluginIsSynth="1" pluginWantsMidiIn="1" pluginChannelConfigs="{0, 2}" pluginIsSynth="1" pluginWantsMidiIn="1"
@ -58,6 +58,9 @@
<FILE id="aR7Eu7" name="mixer.h" compile="0" resource="0" file="Source/mixer.h"/> <FILE id="aR7Eu7" name="mixer.h" compile="0" resource="0" file="Source/mixer.h"/>
<FILE id="KCyK6B" name="opl.h" compile="0" resource="0" file="Source/opl.h"/> <FILE id="KCyK6B" name="opl.h" compile="0" resource="0" file="Source/opl.h"/>
<FILE id="t6cmDm" name="pic.h" compile="0" resource="0" file="Source/pic.h"/> <FILE id="t6cmDm" name="pic.h" compile="0" resource="0" file="Source/pic.h"/>
<FILE id="Me9A0u" name="PluginEditor.cpp" compile="1" resource="0"
file="Source/PluginEditor.cpp"/>
<FILE id="JdG5Dw" name="PluginEditor.h" compile="0" resource="0" file="Source/PluginEditor.h"/>
<FILE id="Phxzxb" name="PluginProcessor.cpp" compile="1" resource="0" <FILE id="Phxzxb" name="PluginProcessor.cpp" compile="1" resource="0"
file="Source/PluginProcessor.cpp"/> file="Source/PluginProcessor.cpp"/>
<FILE id="IvGocs" name="PluginProcessor.h" compile="0" resource="0" <FILE id="IvGocs" name="PluginProcessor.h" compile="0" resource="0"
@ -89,8 +92,8 @@
iosBackgroundAudio="1" iosBackgroundBle="1" UISupportsDocumentBrowser="1" iosBackgroundAudio="1" iosBackgroundBle="1" UISupportsDocumentBrowser="1"
iosDeviceFamily="2" smallIcon="aNR5I9" bigIcon="aNR5I9"> iosDeviceFamily="2" smallIcon="aNR5I9" bigIcon="aNR5I9">
<CONFIGURATIONS> <CONFIGURATIONS>
<CONFIGURATION isDebug="1" name="Debug"/> <CONFIGURATION isDebug="1" name="Debug" iosCompatibility="11.0"/>
<CONFIGURATION isDebug="0" name="Release" linkTimeOptimisation="1"/> <CONFIGURATION isDebug="0" name="Release" iosCompatibility="11.0"/>
</CONFIGURATIONS> </CONFIGURATIONS>
<MODULEPATHS> <MODULEPATHS>
<MODULEPATH id="juce_video" path="modules"/> <MODULEPATH id="juce_video" path="modules"/>
@ -135,7 +138,8 @@
<MODULEPATH id="juce_audio_basics" path="modules"/> <MODULEPATH id="juce_audio_basics" path="modules"/>
</MODULEPATHS> </MODULEPATHS>
</XCODE_MAC> </XCODE_MAC>
<LINUX_MAKE targetFolder="Builds/LinuxMakefile" vstLegacyFolder="modules/vstsdk2.4"> <LINUX_MAKE targetFolder="Builds/LinuxMakefile" vstLegacyFolder="modules/vstsdk2.4"
extraLinkerFlags="-no-pie">
<CONFIGURATIONS> <CONFIGURATIONS>
<CONFIGURATION isDebug="0" name="Release" libraryPath="/usr/X11R6/lib/" linuxArchitecture="-m64" <CONFIGURATION isDebug="0" name="Release" libraryPath="/usr/X11R6/lib/" linuxArchitecture="-m64"
headerPath="../../JuceLibraryCode&#10;../../Source&#10;../../Modules/vstsdk2.4&#10;/usr/include/freetype2&#10;/usr/include"/> headerPath="../../JuceLibraryCode&#10;../../Source&#10;../../Modules/vstsdk2.4&#10;/usr/include/freetype2&#10;/usr/include"/>

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved. and re-saved.
Created with Projucer version: 5.3.2 Created with Projucer version: 5.4.7
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@ -33,7 +33,7 @@
This is a GUI for the OPL2 VST plugin, created in Juce. This is a GUI for the OPL2 VST plugin, created in Juce.
//[/Comments] //[/Comments]
*/ */
class PluginGui : public AudioProcessorEditor, class PluginGui : public Component,
public FileDragAndDropTarget, public FileDragAndDropTarget,
public DragAndDropContainer, public DragAndDropContainer,
public Timer, public Timer,
@ -44,7 +44,7 @@ class PluginGui : public AudioProcessorEditor,
public: public:
//============================================================================== //==============================================================================
PluginGui (AdlibBlasterAudioProcessor* ownerFilter); PluginGui (AdlibBlasterAudioProcessor* ownerFilter);
~PluginGui(); ~PluginGui() override;
//============================================================================== //==============================================================================
//[UserMethods] -- You can add your own custom methods in this section. //[UserMethods] -- You can add your own custom methods in this section.
@ -304,3 +304,4 @@ private:
//[EndFile] You can add extra defines here... //[EndFile] You can add extra defines here...
//[/EndFile] //[/EndFile]

View file

@ -1,5 +1,5 @@
#include "PluginProcessor.h" #include "PluginProcessor.h"
#include "PluginGui.h" #include "PluginEditor.h"
#include "EnumFloatParameter.h" #include "EnumFloatParameter.h"
#include "IntFloatParameter.h" #include "IntFloatParameter.h"
#include "SbiLoader.h" #include "SbiLoader.h"
@ -671,7 +671,7 @@ int AdlibBlasterAudioProcessor::getCurrentProgram()
void AdlibBlasterAudioProcessor::updateGuiIfPresent() void AdlibBlasterAudioProcessor::updateGuiIfPresent()
{ {
PluginGui* gui = (PluginGui*)getActiveEditor(); PluginEditor* gui = (PluginEditor*)getActiveEditor();
if (gui) { if (gui) {
gui->updateFromParameters(); gui->updateFromParameters();
} }
@ -831,7 +831,7 @@ bool AdlibBlasterAudioProcessor::hasEditor() const
AudioProcessorEditor* AdlibBlasterAudioProcessor::createEditor() AudioProcessorEditor* AdlibBlasterAudioProcessor::createEditor()
{ {
PluginGui* gui = new PluginGui(this); PluginEditor* gui = new PluginEditor(this);
gui->updateFromParameters(); gui->updateFromParameters();
return gui; return gui;
} }