commit cb0132011598d5597fc56fd7218795bfc725bbc9
parent 08358146c9e8fe7253476ff7ffa574f926222d55
Author: Steven Atkinson <[email protected]>
Date: Tue, 11 Jul 2023 23:44:42 -0700
Remove old directory-style advice (#329)
Diffstat:
3 files changed, 116 insertions(+), 134 deletions(-)
diff --git a/NeuralAmpModeler/NeuralAmpModeler.cpp b/NeuralAmpModeler/NeuralAmpModeler.cpp
@@ -49,10 +49,7 @@ const IVStyle style =
DEFAULT_WIDGET_ANGLE};
const IVStyle titleStyle =
-DEFAULT_STYLE
-.WithValueText(IText(30, COLOR_WHITE, "Michroma-Regular"))
-.WithDrawFrame(false)
-.WithShadowOffset(2.f);
+ DEFAULT_STYLE.WithValueText(IText(30, COLOR_WHITE, "Michroma-Regular")).WithDrawFrame(false).WithShadowOffset(2.f);
NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
: Plugin(info, MakeConfig(kNumParams, kNumPresets))
@@ -87,10 +84,10 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
pGraphics->AttachTextEntryControl();
pGraphics->EnableMouseOver(true);
pGraphics->EnableTooltips(true);
-
+
pGraphics->LoadFont("Roboto-Regular", ROBOTO_FN);
pGraphics->LoadFont("Michroma-Regular", MICHROMA_FN);
-
+
const auto helpSVG = pGraphics->LoadSVG(HELP_FN);
const auto fileSVG = pGraphics->LoadSVG(FILE_FN);
const auto crossSVG = pGraphics->LoadSVG(CLOSE_BUTTON_FN);
@@ -119,9 +116,9 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
const auto knobHeight = 120.f;
const auto singleKnobPad = -2.0f;
const auto knobsArea = contentArea.GetFromTop(knobHeight)
- .GetReducedFromLeft(knobsPad)
- .GetReducedFromRight(knobsPad)
- .GetVShifted(titleHeight + knobsExtraSpaceBelowTitle);
+ .GetReducedFromLeft(knobsPad)
+ .GetReducedFromRight(knobsPad)
+ .GetVShifted(titleHeight + knobsExtraSpaceBelowTitle);
const auto inputKnobArea = knobsArea.GetGridCell(0, kInputLevel, 1, numKnobs).GetPadded(-singleKnobPad);
const auto noiseGateArea = knobsArea.GetGridCell(0, kNoiseGateThreshold, 1, numKnobs).GetPadded(-singleKnobPad);
const auto bassKnobArea = knobsArea.GetGridCell(0, kToneBass, 1, numKnobs).GetPadded(-singleKnobPad);
@@ -129,26 +126,26 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
const auto trebleKnobArea = knobsArea.GetGridCell(0, kToneTreble, 1, numKnobs).GetPadded(-singleKnobPad);
const auto outputKnobArea = knobsArea.GetGridCell(0, kOutputLevel, 1, numKnobs).GetPadded(-singleKnobPad);
- const auto ngToggleArea = noiseGateArea.GetVShifted(noiseGateArea.H()).SubRectVertical(2, 0).GetReducedFromTop(10.0f);
+ const auto ngToggleArea =
+ noiseGateArea.GetVShifted(noiseGateArea.H()).SubRectVertical(2, 0).GetReducedFromTop(10.0f);
const auto eqToggleArea = midKnobArea.GetVShifted(midKnobArea.H()).SubRectVertical(2, 0).GetReducedFromTop(10.0f);
- const auto outNormToggleArea = outputKnobArea.GetVShifted(midKnobArea.H()).SubRectVertical(2, 0).GetReducedFromTop(10.0f);
+ const auto outNormToggleArea =
+ outputKnobArea.GetVShifted(midKnobArea.H()).SubRectVertical(2, 0).GetReducedFromTop(10.0f);
// Areas for model and IR
const auto fileWidth = 200.0f;
const auto fileHeight = 30.0f;
const auto irYOffset = 38.0f;
- const auto modelArea = contentArea.GetFromBottom((2.0f * fileHeight))
- .GetFromTop(fileHeight)
- .GetMidHPadded(fileWidth)
- .GetVShifted(-1);
+ const auto modelArea =
+ contentArea.GetFromBottom((2.0f * fileHeight)).GetFromTop(fileHeight).GetMidHPadded(fileWidth).GetVShifted(-1);
const auto modelIconArea = modelArea.GetFromLeft(30).GetTranslated(-40, 10);
const auto irArea = modelArea.GetVShifted(irYOffset);
const auto irSwitchArea = irArea.GetFromLeft(30).GetHShifted(-40).GetScaledAboutCentre(0.6);
-
+
// Areas for meters
const auto inputMeterArea = contentArea.GetFromLeft(30).GetHShifted(-20).GetMidVPadded(100).GetVShifted(-25);
const auto outputMeterArea = contentArea.GetFromRight(30).GetHShifted(20).GetMidVPadded(100).GetVShifted(-25);
-
+
// Misc Areas
const auto helpButtonArea = mainArea.GetFromTRHC(50, 50).GetCentredInside(20, 20);
@@ -162,12 +159,7 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
if (msg.size())
{
std::stringstream ss;
- ss << "Failed to load NAM model. Message:\n\n"
- << msg << "\n\n"
- << "If the model is an old \"directory-style\" model, it "
- "can be "
- "converted using the utility at "
- "https://github.com/sdatkinson/nam-model-utility";
+ ss << "Failed to load NAM model. Message:\n\n" << msg;
GetUI()->ShowMessageBox(ss.str().c_str(), "Failed to load model!", kMB_OK);
}
std::cout << "Loaded: " << fileName.Get() << std::endl;
@@ -204,24 +196,28 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
const std::string defaultIRString = "Select IR...";
#endif
pGraphics->AttachControl(new NAMFileBrowserControl(modelArea, kMsgTagClearModel, defaultNamFileString.c_str(),
- "nam", loadModelCompletionHandler, style, fileSVG,
- crossSVG, leftArrowSVG, rightArrowSVG, fileBackgroundBitmap),
+ "nam", loadModelCompletionHandler, style, fileSVG, crossSVG,
+ leftArrowSVG, rightArrowSVG, fileBackgroundBitmap),
kCtrlTagModelFileBrowser);
- pGraphics->AttachControl(new ISVGSwitchControl(irSwitchArea, { irIconOffSVG, irIconOnSVG}, kIRToggle));
- pGraphics->AttachControl(new NAMFileBrowserControl(irArea, kMsgTagClearModel, defaultIRString.c_str(), "wav",
- loadIRCompletionHandler, style,
- fileSVG, crossSVG, leftArrowSVG, rightArrowSVG, fileBackgroundBitmap),
- kCtrlTagIRFileBrowser);
+ pGraphics->AttachControl(new ISVGSwitchControl(irSwitchArea, {irIconOffSVG, irIconOnSVG}, kIRToggle));
+ pGraphics->AttachControl(
+ new NAMFileBrowserControl(irArea, kMsgTagClearModel, defaultIRString.c_str(), "wav", loadIRCompletionHandler,
+ style, fileSVG, crossSVG, leftArrowSVG, rightArrowSVG, fileBackgroundBitmap),
+ kCtrlTagIRFileBrowser);
pGraphics->AttachControl(new NAMSwitchControl(ngToggleArea, kNoiseGateActive, " ", style, switchHandleBitmap));
pGraphics->AttachControl(new NAMSwitchControl(eqToggleArea, kEQActive, "EQ", style, switchHandleBitmap));
- pGraphics->AttachControl(new NAMSwitchControl(outNormToggleArea, kOutNorm, "Normalize", style, switchHandleBitmap), kCtrlTagOutNorm);
+ pGraphics->AttachControl(
+ new NAMSwitchControl(outNormToggleArea, kOutNorm, "Normalize", style, switchHandleBitmap), kCtrlTagOutNorm);
// The knobs
pGraphics->AttachControl(new NAMKnobControl(inputKnobArea, kInputLevel, "", style, knobBackgroundBitmap));
pGraphics->AttachControl(new NAMKnobControl(noiseGateArea, kNoiseGateThreshold, "", style, knobBackgroundBitmap));
- pGraphics->AttachControl(new NAMKnobControl(bassKnobArea, kToneBass, "", style, knobBackgroundBitmap), -1, "EQ_KNOBS");
- pGraphics->AttachControl(new NAMKnobControl(midKnobArea, kToneMid, "", style, knobBackgroundBitmap), -1, "EQ_KNOBS");
- pGraphics->AttachControl(new NAMKnobControl(trebleKnobArea, kToneTreble, "", style, knobBackgroundBitmap), -1, "EQ_KNOBS");
+ pGraphics->AttachControl(
+ new NAMKnobControl(bassKnobArea, kToneBass, "", style, knobBackgroundBitmap), -1, "EQ_KNOBS");
+ pGraphics->AttachControl(
+ new NAMKnobControl(midKnobArea, kToneMid, "", style, knobBackgroundBitmap), -1, "EQ_KNOBS");
+ pGraphics->AttachControl(
+ new NAMKnobControl(trebleKnobArea, kToneTreble, "", style, knobBackgroundBitmap), -1, "EQ_KNOBS");
pGraphics->AttachControl(new NAMKnobControl(outputKnobArea, kOutputLevel, "", style, knobBackgroundBitmap));
// The meters
@@ -229,7 +225,8 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
pGraphics->AttachControl(new NAMMeterControl(outputMeterArea, meterBackgroundBitmap, style), kCtrlTagOutputMeter);
// Help/about box
- pGraphics->AttachControl(new NAMCircleButtonControl(helpButtonArea,
+ pGraphics->AttachControl(new NAMCircleButtonControl(
+ helpButtonArea,
[pGraphics](IControl* pCaller) {
pGraphics->GetControlWithTag(kCtrlTagAboutBox)->As<NAMAboutBoxControl>()->HideAnimated(false);
},
@@ -241,9 +238,8 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
pControl->SetMouseEventsWhenDisabled(true);
pControl->SetMouseOverWhenDisabled(true);
});
-
- pGraphics->GetControlWithTag(kCtrlTagOutNorm)->SetMouseEventsWhenDisabled(false);
+ pGraphics->GetControlWithTag(kCtrlTagOutNorm)->SetMouseEventsWhenDisabled(false);
};
}
@@ -303,9 +299,8 @@ void NeuralAmpModeler::ProcessBlock(iplug::sample** inputs, iplug::sample** outp
_FallbackDSP(triggerOutput, mOutputPointers, numChannelsInternal, numFrames);
}
// Apply the noise gate
- sample** gateGainOutput = noiseGateActive
- ? mNoiseGateGain.Process(mOutputPointers, numChannelsInternal, numFrames)
- : mOutputPointers;
+ sample** gateGainOutput =
+ noiseGateActive ? mNoiseGateGain.Process(mOutputPointers, numChannelsInternal, numFrames) : mOutputPointers;
sample** toneStackOutPointers = gateGainOutput;
if (toneStackActive)
@@ -403,8 +398,7 @@ void NeuralAmpModeler::OnUIOpen()
Plugin::OnUIOpen();
if (mNAMPath.GetLength())
- SendControlMsgFromDelegate(
- kCtrlTagModelFileBrowser, kMsgTagLoadedModel, mNAMPath.GetLength(), mNAMPath.Get());
+ SendControlMsgFromDelegate(kCtrlTagModelFileBrowser, kMsgTagLoadedModel, mNAMPath.GetLength(), mNAMPath.Get());
if (mIRPath.GetLength())
SendControlMsgFromDelegate(kCtrlTagIRFileBrowser, kMsgTagLoadedIR, mIRPath.GetLength(), mIRPath.Get());
if (mModel != nullptr)
@@ -437,12 +431,11 @@ bool NeuralAmpModeler::OnMessage(int msgTag, int ctrlTag, int dataSize, const vo
case kMsgTagClearIR: mShouldRemoveIR = true; return true;
case kMsgTagHighlightColor:
{
- mHighLightColor.Set((const char*) pData);
-
+ mHighLightColor.Set((const char*)pData);
+
if (GetUI())
{
- GetUI()->ForStandardControlsFunc([&](IControl* pControl){
-
+ GetUI()->ForStandardControlsFunc([&](IControl* pControl) {
if (auto* pVectorBase = pControl->As<IVectorBase>())
{
IColor color = IColor::FromColorCodeStr(mHighLightColor.Get());
@@ -455,7 +448,7 @@ bool NeuralAmpModeler::OnMessage(int msgTag, int ctrlTag, int dataSize, const vo
pControl->GetUI()->SetAllControlsDirty();
});
}
-
+
return true;
}
default: return false;
@@ -542,8 +535,7 @@ std::string NeuralAmpModeler::_StageModel(const WDL_String& modelPath)
auto dspPath = std::filesystem::u8path(modelPath.Get());
mStagedModel = get_dsp(dspPath);
mNAMPath = modelPath;
- SendControlMsgFromDelegate(
- kCtrlTagModelFileBrowser, kMsgTagLoadedModel, mNAMPath.GetLength(), mNAMPath.Get());
+ SendControlMsgFromDelegate(kCtrlTagModelFileBrowser, kMsgTagLoadedModel, mNAMPath.GetLength(), mNAMPath.Get());
}
catch (std::exception& e)
{
diff --git a/NeuralAmpModeler/NeuralAmpModeler.h b/NeuralAmpModeler/NeuralAmpModeler.h
@@ -164,8 +164,8 @@ private:
WDL_String mNAMPath;
// Path to IR (.wav file)
WDL_String mIRPath;
-
- WDL_String mHighLightColor {PluginColors::NAM_THEMECOLOR.ToColorCode()};
+
+ WDL_String mHighLightColor{PluginColors::NAM_THEMECOLOR.ToColorCode()};
std::unordered_map<std::string, double> mNAMParams = {{"Input", 0.0}, {"Output", 0.0}};
diff --git a/NeuralAmpModeler/NeuralAmpModelerControls.h b/NeuralAmpModeler/NeuralAmpModelerControls.h
@@ -59,7 +59,7 @@ public:
auto knobRect = mWidgetBounds.GetCentredInside(mWidgetBounds.W(), mWidgetBounds.W());
const float cx = knobRect.MW(), cy = knobRect.MH();
const float angle = mAngle1 + (static_cast<float>(GetValue()) * (mAngle2 - mAngle1));
- DrawIndicatorTrack(g, angle, cx+0.5, cy, widgetRadius);
+ DrawIndicatorTrack(g, angle, cx + 0.5, cy, widgetRadius);
g.DrawFittedBitmap(mBitmap, knobRect);
float data[2][2];
RadialPoints(angle, cx, cy, mInnerPointerFrac * widgetRadius, mInnerPointerFrac * widgetRadius, 2, data);
@@ -77,16 +77,16 @@ class NAMSwitchControl : public IVSlideSwitchControl, public IBitmapBase
{
public:
NAMSwitchControl(const IRECT& bounds, int paramIdx, const char* label, const IVStyle& style, IBitmap bitmap)
- : IVSlideSwitchControl(bounds, paramIdx, label, style
- .WithRoundness(0.666f)
- .WithShowValue(false)
- .WithEmboss(true)
- .WithShadowOffset(1.5f)
- .WithDrawShadows(false)
- .WithColor(kFR, COLOR_BLACK)
- .WithFrameThickness(0.5f)
- .WithWidgetFrac(0.5f)
- .WithLabelOrientation(EOrientation::South))
+ : IVSlideSwitchControl(bounds, paramIdx, label,
+ style.WithRoundness(0.666f)
+ .WithShowValue(false)
+ .WithEmboss(true)
+ .WithShadowOffset(1.5f)
+ .WithDrawShadows(false)
+ .WithColor(kFR, COLOR_BLACK)
+ .WithFrameThickness(0.5f)
+ .WithWidgetFrac(0.5f)
+ .WithLabelOrientation(EOrientation::South))
, IBitmapBase(bitmap)
{
}
@@ -103,13 +103,13 @@ public:
handleBounds = IRECT(handleBounds.L, handleBounds.T, handleBounds.R, handleBounds.T + mBitmap.H());
IRECT centreBounds = handleBounds.GetPadded(-mStyle.shadowOffset);
IRECT shadowBounds = handleBounds.GetTranslated(mStyle.shadowOffset, mStyle.shadowOffset);
-// const float contrast = mDisabled ? -GRAYED_ALPHA : 0.f;
+ // const float contrast = mDisabled ? -GRAYED_ALPHA : 0.f;
float cR = 7.f;
const float tlr = cR;
const float trr = cR;
const float blr = cR;
const float brr = cR;
-
+
// outer shadow
if (mStyle.drawShadows)
g.FillRoundRect(GetColor(kSH), shadowBounds, tlr, trr, blr, brr, &mBlend);
@@ -118,10 +118,10 @@ public:
if (mStyle.emboss)
{
// Positive light
- g.FillRoundRect(GetColor(kPR), handleBounds, tlr, trr, blr, brr/*, &blend*/);
+ g.FillRoundRect(GetColor(kPR), handleBounds, tlr, trr, blr, brr /*, &blend*/);
// Negative light
- g.FillRoundRect(GetColor(kSH), shadowBounds, tlr, trr, blr, brr/*, &blend*/);
+ g.FillRoundRect(GetColor(kSH), shadowBounds, tlr, trr, blr, brr /*, &blend*/);
// Fill in foreground
g.FillRoundRect(GetValue() > 0.5 ? GetColor(kX1) : COLOR_BLACK, centreBounds, tlr, trr, blr, brr, &mBlend);
@@ -132,7 +132,7 @@ public:
}
else
{
- g.FillRoundRect(GetValue() > 0.5 ? GetColor(kX1) : COLOR_BLACK, handleBounds, tlr, trr, blr, brr/*, &blend*/);
+ g.FillRoundRect(GetValue() > 0.5 ? GetColor(kX1) : COLOR_BLACK, handleBounds, tlr, trr, blr, brr /*, &blend*/);
// Shade when hovered
if (mMouseIsOver)
@@ -154,7 +154,7 @@ public:
{
r = filledArea.GetFromRight(mBitmap.W());
}
-
+
g.DrawBitmap(mBitmap, r, 0, 0, nullptr);
}
};
@@ -215,11 +215,8 @@ public:
{
mIgnoreMouse = true;
}
-
- void Draw(IGraphics& g) override
- {
- g.DrawFittedBitmap(mBitmap, mRECT);
- }
+
+ void Draw(IGraphics& g) override { g.DrawFittedBitmap(mBitmap, mRECT); }
void OnPopupMenuSelection(IPopupMenu* pSelectedMenu, int valIdx) override
{
@@ -397,19 +394,18 @@ class NAMMeterControl : public IVPeakAvgMeterControl<>, public IBitmapBase
{
static constexpr float KMeterMin = -70.0f;
static constexpr float KMeterMax = -0.01f;
-
+
public:
NAMMeterControl(const IRECT& bounds, const IBitmap& bitmap, const IVStyle& style)
- : IVPeakAvgMeterControl<>(bounds, "",
- style.WithShowValue(false).WithDrawFrame(false).WithWidgetFrac(0.8),
+ : IVPeakAvgMeterControl<>(bounds, "", style.WithShowValue(false).WithDrawFrame(false).WithWidgetFrac(0.8),
EDirection::Vertical, {}, 0, KMeterMin, KMeterMax, {})
, IBitmapBase(bitmap)
{
SetPeakSize(1.0f);
}
-
+
void OnRescale() override { mBitmap = GetUI()->GetScaledBitmap(mBitmap); }
-
+
virtual void OnResize() override
{
SetTargetRECT(MakeRects(mRECT));
@@ -418,18 +414,15 @@ public:
MakeStepRects(mWidgetBounds, mNSteps);
SetDirty(false);
}
-
- void DrawBackground(IGraphics& g, const IRECT& r) override
- {
- g.DrawFittedBitmap(mBitmap, r);
- }
-
+
+ void DrawBackground(IGraphics& g, const IRECT& r) override { g.DrawFittedBitmap(mBitmap, r); }
+
void DrawTrackHandle(IGraphics& g, const IRECT& r, int chIdx, bool aboveBaseValue) override
{
if (r.H() > 2)
g.FillRect(GetColor(kX1), r, &mBlend);
}
-
+
void DrawPeak(IGraphics& g, const IRECT& r, int chIdx, bool aboveBaseValue) override
{
g.DrawGrid(COLOR_BLACK, mTrackBounds.Get()[chIdx], 10, 2);
@@ -448,7 +441,7 @@ public:
{
mIgnoreMouse = false;
}
-
+
bool OnKeyDown(float x, float y, const IKeyPress& key) override
{
if (key.VK == kVK_ESCAPE)
@@ -456,15 +449,12 @@ public:
HideAnimated(true);
return true;
}
-
+
return false;
}
-
- void OnMouseDown(float x, float y, const IMouseMod& mod) override
- {
- HideAnimated(true);
- }
-
+
+ void OnMouseDown(float x, float y, const IMouseMod& mod) override { HideAnimated(true); }
+
void HideAnimated(bool hide)
{
mWillHide = hide;
@@ -475,28 +465,27 @@ public:
}
else // hide subcontrols immediately
{
- ForAllChildrenFunc([hide](int childIdx, IControl* pChild) {
- pChild->Hide(hide);
- });
+ ForAllChildrenFunc([hide](int childIdx, IControl* pChild) { pChild->Hide(hide); });
}
- SetAnimation([&](IControl* pCaller) {
- auto progress = static_cast<float>(pCaller->GetAnimationProgress());
+ SetAnimation(
+ [&](IControl* pCaller) {
+ auto progress = static_cast<float>(pCaller->GetAnimationProgress());
- if (mWillHide)
- SetBlend(IBlend(EBlend::Default, 1.0f-progress));
- else
- SetBlend(IBlend(EBlend::Default, progress));
+ if (mWillHide)
+ SetBlend(IBlend(EBlend::Default, 1.0f - progress));
+ else
+ SetBlend(IBlend(EBlend::Default, progress));
- if (progress > 1.0f)
- {
- pCaller->OnEndAnimation();
- IContainerBase::Hide(mWillHide);
- GetUI()->SetAllControlsDirty();
- return;
- }
-
- }, mAnimationTime);
+ if (progress > 1.0f)
+ {
+ pCaller->OnEndAnimation();
+ IContainerBase::Hide(mWillHide);
+ GetUI()->SetAllControlsDirty();
+ return;
+ }
+ },
+ mAnimationTime);
SetDirty(true);
}
@@ -505,39 +494,41 @@ public:
{
AddChildControl(new IBitmapControl(IRECT(), mBitmap))->SetIgnoreMouse(true);
- const IVStyle titleStyle =
- DEFAULT_STYLE
- .WithValueText(IText(30, COLOR_WHITE, "Michroma-Regular"))
- .WithDrawFrame(false)
- .WithShadowOffset(2.f);
-
+ const IVStyle titleStyle = DEFAULT_STYLE.WithValueText(IText(30, COLOR_WHITE, "Michroma-Regular"))
+ .WithDrawFrame(false)
+ .WithShadowOffset(2.f);
+
AddChildControl(new IVLabelControl(IRECT(), "NEURAL AMP MODELER", titleStyle));
WDL_String verStr, buildInfoStr;
PLUG()->GetPluginVersionStr(verStr);
-
+
buildInfoStr.SetFormatted(100, "Version %s %s %s", verStr.Get(), PLUG()->GetArchStr(), PLUG()->GetAPIStr());
-
+
const auto text = IText(DEFAULT_TEXT_SIZE, EAlign::Center, PluginColors::HELP_TEXT);
const auto style = mStyle.WithDrawFrame(false).WithValueText(text);
-
+
AddChildControl(new IVLabelControl(IRECT(), "By Steven Atkinson", style));
AddChildControl(new IVLabelControl(IRECT(), buildInfoStr.Get(), style));
- AddChildControl(new IURLControl(IRECT(), "Plug-in development: Steve Atkinson, Oli Larkin, ... ", "https://github.com/sdatkinson/NeuralAmpModelerPlugin/graphs/contributors", text, COLOR_TRANSPARENT, PluginColors::HELP_TEXT_MO, PluginColors::HELP_TEXT_CLICKED));
- AddChildControl(new IURLControl(IRECT(), "www.neuralampmodeler.com", "https://www.neuralampmodeler.com", text, COLOR_TRANSPARENT, PluginColors::HELP_TEXT_MO, PluginColors::HELP_TEXT_CLICKED));
-
-// AddChildControl(new IVColorSwatchControl(IRECT() , "Highlight", [&](int idx, IColor color){
-//
-// WDL_String colorCodeStr;
-// color.ToColorCodeStr(colorCodeStr, false);
-// this->GetDelegate()->SendArbitraryMsgFromUI(kMsgTagHighlightColor, kNoTag, colorCodeStr.GetLength(), colorCodeStr.Get());
-//
-// }, mStyle, IVColorSwatchControl::ECellLayout::kHorizontal, {kFG}, {""}));
+ AddChildControl(new IURLControl(IRECT(), "Plug-in development: Steve Atkinson, Oli Larkin, ... ",
+ "https://github.com/sdatkinson/NeuralAmpModelerPlugin/graphs/contributors", text,
+ COLOR_TRANSPARENT, PluginColors::HELP_TEXT_MO, PluginColors::HELP_TEXT_CLICKED));
+ AddChildControl(new IURLControl(IRECT(), "www.neuralampmodeler.com", "https://www.neuralampmodeler.com", text,
+ COLOR_TRANSPARENT, PluginColors::HELP_TEXT_MO, PluginColors::HELP_TEXT_CLICKED));
+
+ // AddChildControl(new IVColorSwatchControl(IRECT() , "Highlight", [&](int idx, IColor color){
+ //
+ // WDL_String colorCodeStr;
+ // color.ToColorCodeStr(colorCodeStr, false);
+ // this->GetDelegate()->SendArbitraryMsgFromUI(kMsgTagHighlightColor, kNoTag, colorCodeStr.GetLength(),
+ // colorCodeStr.Get());
+ //
+ // }, mStyle, IVColorSwatchControl::ECellLayout::kHorizontal, {kFG}, {""}));
OnResize();
}
-
+
void OnResize() override
{
if (NChildren())
@@ -551,15 +542,14 @@ public:
GetChild(3)->SetTargetAndDrawRECTs(titleLabel.GetVShifted(titleLabel.H() + 20).GetMidVPadded(5));
GetChild(4)->SetTargetAndDrawRECTs(titleLabel.GetVShifted(titleLabel.H() + 40).GetMidVPadded(7));
GetChild(5)->SetTargetAndDrawRECTs(titleLabel.GetVShifted(titleLabel.H() + 60).GetMidVPadded(7));
-// GetChild(6)->SetTargetAndDrawRECTs(content.GetFromBRHC(100, 50));
+ // GetChild(6)->SetTargetAndDrawRECTs(content.GetFromBRHC(100, 50));
}
}
-
+
private:
IBitmap mBitmap;
IVStyle mStyle;
int mAnimationTime = 200;
bool mWillHide = false;
};
-