diff --git a/Source/Processors/Editors/GenericEditor.cpp b/Source/Processors/Editors/GenericEditor.cpp index aca21b32130dc8c27059640f8ea82e8bfb648182..9600c196b55cca1af84dfa8ddd4f7f9e1a6f7f18 100644 --- a/Source/Processors/Editors/GenericEditor.cpp +++ b/Source/Processors/Editors/GenericEditor.cpp @@ -79,6 +79,13 @@ GenericEditor::GenericEditor (GenericProcessor* owner)//, FilterViewport* vp) audioChannels.clear(); recordChannels.clear(); + backgroundGradient = ColourGradient(Colour(190, 190, 190), 0.0f, 0.0f, + Colour(145, 145, 145), 0.0f, 150.0f, false); + + //grad.addColour(0.5f, Colour(170, 170, 170)); + //grad.addColour(0.5, Colours::lightgrey); + //grad.addColour(1.0f, Colours::grey); + fadeIn(); } @@ -223,7 +230,10 @@ void GenericEditor::paint (Graphics& g) g.fillRect(1,1,getWidth()-(2+offset),getHeight()-2); // draw gray workspace - g.setColour(Colour(140, 140, 140)); + //g.setColour(Colour(140, 140, 140)); + + + g.setGradientFill(backgroundGradient); g.fillRect(1,22,getWidth()-2, getHeight()-29); g.setFont(titleFont); @@ -252,7 +262,7 @@ void GenericEditor::paint (Graphics& g) if (isFading) { - g.setColour(Colours::black.withAlpha((float) (15.0-accumulator)/15.0f)); + g.setColour(Colours::black.withAlpha((float) (10.0-accumulator)/10.0f)); if (getWidth() > 0 && getHeight() > 0) g.fillAll(); } @@ -265,7 +275,7 @@ void GenericEditor::timerCallback() repaint(); - if (accumulator > 15.0) + if (accumulator > 10.0) { stopTimer(); isFading = false; diff --git a/Source/Processors/Editors/GenericEditor.h b/Source/Processors/Editors/GenericEditor.h index ae8a7dcbad1694df91f87613c2a2a3f80e8b2e9f..5530b679b9c55df1e0f0368d63752d0c8179a309 100644 --- a/Source/Processors/Editors/GenericEditor.h +++ b/Source/Processors/Editors/GenericEditor.h @@ -133,6 +133,7 @@ private: virtual void destroyChannelSelectors(); Colour backgroundColor; + ColourGradient backgroundGradient; bool isSelected; bool isEnabled; diff --git a/Source/Processors/GenericProcessor.cpp b/Source/Processors/GenericProcessor.cpp index 7fb5bec8db210dbf5e1a2ad7bbc4394f70f6eef7..16f70eb2f9c7aa75b5aac1ee87e5cfbfe67e2b61 100644 --- a/Source/Processors/GenericProcessor.cpp +++ b/Source/Processors/GenericProcessor.cpp @@ -49,19 +49,22 @@ void GenericProcessor::setParameter (int parameterIndex, float newValue) { if (currentChannel > 0) { - parameters[parameterIndex]->setValue(newValue, currentChannel); + //Parameter& p = parameters[parameterIndex]; + //parameters[parameterIndex].setValue(newValue, currentChannel); } } const String GenericProcessor::getParameterName (int parameterIndex) { - return parameters[parameterIndex]->getName(); + //Parameter& p = parameters[parameterIndex]; + //return parameters[parameterIndex].getName(); } const String GenericProcessor::getParameterText (int parameterIndex) { - return parameters[parameterIndex]->getDescription(); + //Parameter& p = parameters[parameterIndex]; + //return parameters[parameterIndex].getDescription(); } diff --git a/Source/Processors/Parameter.cpp b/Source/Processors/Parameter.cpp index aaa71ad9bc29347dd79f472a1703000ba6c740d0..d68d52698f9b01ed637dbd326888d2b04a0c9824 100644 --- a/Source/Processors/Parameter.cpp +++ b/Source/Processors/Parameter.cpp @@ -68,14 +68,14 @@ Parameter::Parameter(const String& name_, Array<var> a, int defaultVal) void Parameter::setValue(float val, int chan) { - if (isBoolean) + if (isBoolean()) { if (val > 0.0f) values.set(chan, true); else values.set(chan, false); } - else if (isContinuous) { + else if (isContinuous()) { if (val < (float) possibleValues[0]) { diff --git a/Source/Processors/SignalGenerator.cpp b/Source/Processors/SignalGenerator.cpp index a0f5edd718d0f772b1d763345338d886041aef54..35b192f4566c04c81f93b3a0800477ffaaf44c90 100644 --- a/Source/Processors/SignalGenerator.cpp +++ b/Source/Processors/SignalGenerator.cpp @@ -42,7 +42,7 @@ SignalGenerator::SignalGenerator() p.setValue(0.0f, 0); bool a = p[0]; - parameters.add(&p); + parameters.add(p); } diff --git a/Source/UI/EditorViewport.cpp b/Source/UI/EditorViewport.cpp index fb79d4cfb697cd3c1c0aa1e1cc664bbfd3ebaca2..b4752b7f4bd2c05d5bac7b3fda441396b432c069 100644 --- a/Source/UI/EditorViewport.cpp +++ b/Source/UI/EditorViewport.cpp @@ -663,16 +663,45 @@ void SignalChainTabButton::clicked() void SignalChainTabButton::paintButton(Graphics &g, bool isMouseOver, bool isButtonDown) { - if (getToggleState() == true) - g.setColour(Colours::orange); - else - g.setColour(Colours::darkgrey); - if (isMouseOver) - g.setColour(Colours::white); + ColourGradient grad1, grad2; + + if (getToggleState() == true) { + + grad1 = ColourGradient(Colour(255, 136, 34), 0.0f, 0.0f, + Colour(230, 193, 32), 0.0f, 20.0f, + false); + + grad2 = ColourGradient(Colour(255, 136, 34), 0.0f, 20.0f, + Colour(230, 193, 32), 0.0f, 0.0f, + false); + } + else { + grad2 = ColourGradient(Colour(80, 80, 80), 0.0f, 20.0f, + Colour(120, 120, 120), 0.0f, 0.0f, + false); + + grad1 = ColourGradient(Colour(80, 80, 80), 0.0f, 0.0f, + Colour(120, 120, 120), 0.0f, 20.0f, + false); + } + + if (isMouseOver) { + grad1 = ColourGradient(Colour(255, 255, 255), 0.0f, 20.0f, + Colour(180, 180, 180), 0.0f, 0.0f, + false); + grad2 = ColourGradient(Colour(255, 255, 255), 0.0f, 0.0f, + Colour(180, 180, 180), 0.0f, 20.0f, + false); + } + + g.setGradientFill(grad2); g.fillEllipse(0,0,getWidth(),getHeight()); + g.setGradientFill(grad1); + g.fillEllipse(2,2,getWidth()-4,getHeight()-4); + g.setFont(buttonFont); g.setColour(Colours::black); diff --git a/Source/UI/ProcessorList.cpp b/Source/UI/ProcessorList.cpp index e7ade799ba4187a13f674d0c69c47b901fe1986a..405b0eed98c0ebd65f23e7a7b850d08214f5479f 100644 --- a/Source/UI/ProcessorList.cpp +++ b/Source/UI/ProcessorList.cpp @@ -45,9 +45,9 @@ ProcessorList::ProcessorList() : isDragging(false), }; setColour(PROCESSOR_COLOR, Colour(59, 59, 59)); - setColour(FILTER_COLOR, Colour(103, 107, 158));//Colour(255, 89, 0)); - setColour(SINK_COLOR, Colour(150, 62, 150));//Colour(255, 149, 0)); - setColour(SOURCE_COLOR, Colour(116, 166, 128)); //Colour(255, 0, 0)); + setColour(FILTER_COLOR, Colour(27, 86, 224));//Colour(255, 89, 0)); + setColour(SINK_COLOR, Colour(41, 76, 158));//Colour(255, 149, 0)); + setColour(SOURCE_COLOR, Colour(48, 67, 112)); //Colour(255, 0, 0)); setColour(UTILITY_COLOR, Colour(90, 80, 80)); ProcessorListItem* sources = new ProcessorListItem("Sources");