commit 054a6cf7e7dc518fdfdbc72d7852a1a48d61b25a
parent 2b09c7bef9324afe7450934c6505972eb912a408
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Sun, 20 Mar 2022 01:19:12 +0100
split focused parameter name + value into separate components
Diffstat:
4 files changed, 55 insertions(+), 14 deletions(-)
diff --git a/source/jucePlugin/skins/Hoverland/VirusC_Hoverland.json b/source/jucePlugin/skins/Hoverland/VirusC_Hoverland.json
@@ -104,9 +104,9 @@
}
},
{
- "name" : "ControlLabel",
+ "name" : "FocusedParameterName",
"label" : {
- "text" : "Osc 1 Semitone\n-12",
+ "text" : "Osc 1 Semitone",
"textHeight" : "32",
"color" : "FF7180FF",
"alignH" : "R",
@@ -115,7 +115,22 @@
"x" : "1190.6",
"y" : "92.90002",
"width" : "368",
- "height" : "80"
+ "height" : "35.759"
+ }
+ },
+ {
+ "name" : "FocusedParameterValue",
+ "label" : {
+ "text" : "-12",
+ "textHeight" : "32",
+ "color" : "FF7180FF",
+ "alignH" : "R",
+ "alignV" : "T",
+ "bold" : "1",
+ "x" : "1190.6",
+ "y" : "128.6589",
+ "width" : "368",
+ "height" : "42.241"
}
},
{
diff --git a/source/jucePlugin/skins/Trancy/VirusC_Trancy.json b/source/jucePlugin/skins/Trancy/VirusC_Trancy.json
@@ -34,18 +34,35 @@
}
},
{
- "name" : "ControlLabel",
+ "name" : "FocusedParameterValue",
"label" : {
"text" : "-42",
"textHeight" : "36",
+ "backgroundColor" : "230303FF",
"alignH" : "R",
"alignV" : "C",
"fontFile" : "Digital",
"fontName" : "Register",
- "x" : "1757.85",
- "y" : "37.1999",
- "width" : "368",
- "height" : "51.289"
+ "x" : "1869.05",
+ "y" : "44.2",
+ "width" : "256.7",
+ "height" : "38"
+ }
+ },
+ {
+ "name" : "FocusedParameterName",
+ "label" : {
+ "text" : "Osc",
+ "textHeight" : "36",
+ "backgroundColor" : "230303FF",
+ "alignH" : "L",
+ "alignV" : "C",
+ "fontFile" : "Digital",
+ "fontName" : "Register",
+ "x" : "1477.7",
+ "y" : "44.2",
+ "width" : "391.35",
+ "height" : "38"
}
},
{
diff --git a/source/jucePlugin/ui3/VirusEditor.cpp b/source/jucePlugin/ui3/VirusEditor.cpp
@@ -25,7 +25,8 @@ namespace genericVirusUI
m_patchBrowser.reset(new PatchBrowser(*this));
m_presetName = findComponentT<juce::Label>("PatchName");
- m_controlLabel = findComponentT<juce::Label>("ControlLabel");
+ m_focusedParameterName = findComponentT<juce::Label>("FocusedParameterName");
+ m_focusedParameterValue = findComponentT<juce::Label>("FocusedParameterValue");
m_romSelector = findComponentT<juce::ComboBox>("RomSelector");
m_playModeSingle = findComponentT<juce::Button>("PlayModeSingle", false);
@@ -58,7 +59,8 @@ namespace genericVirusUI
addMouseListener(this, true);
- m_controlLabel->setText("", juce::dontSendNotification);
+ m_focusedParameterName->setVisible(false);
+ m_focusedParameterValue->setVisible(false);
auto* versionInfo = findComponentT<juce::Label>("VersionInfo", false);
@@ -187,7 +189,8 @@ namespace genericVirusUI
if(!_component || !_component->getProperties().contains("parameter"))
{
- m_controlLabel->setText("", juce::dontSendNotification);
+ m_focusedParameterName->setVisible(false);
+ m_focusedParameterValue->setVisible(false);
return;
}
@@ -197,7 +200,8 @@ namespace genericVirusUI
if(!p)
{
- m_controlLabel->setText("", juce::dontSendNotification);
+ m_focusedParameterName->setVisible(false);
+ m_focusedParameterValue->setVisible(false);
return;
}
@@ -205,7 +209,11 @@ namespace genericVirusUI
const auto& desc = p->getDescription();
- m_controlLabel->setText(desc.name + "\n" + value, juce::dontSendNotification);
+ m_focusedParameterName->setText(desc.name, juce::dontSendNotification);
+ m_focusedParameterValue->setText(value, juce::dontSendNotification);
+
+ m_focusedParameterName->setVisible(true);
+ m_focusedParameterValue->setVisible(true);
}
void VirusEditor::updatePresetName() const
diff --git a/source/jucePlugin/ui3/VirusEditor.h b/source/jucePlugin/ui3/VirusEditor.h
@@ -59,7 +59,8 @@ namespace genericVirusUI
std::unique_ptr<PatchBrowser> m_patchBrowser;
juce::Label* m_presetName = nullptr;
- juce::Label* m_controlLabel = nullptr;
+ juce::Label* m_focusedParameterName = nullptr;
+ juce::Label* m_focusedParameterValue = nullptr;
juce::ComboBox* m_romSelector = nullptr;
juce::Button* m_playModeSingle = nullptr;