diff --git a/Source/Processors/Editors/RHD2000Editor.cpp b/Source/Processors/Editors/RHD2000Editor.cpp index 79e36583b2caa979f8909e767bec7c742a00bc23..159e04001115c5fbde164099e87a08d2e3e20e6d 100644 --- a/Source/Processors/Editors/RHD2000Editor.cpp +++ b/Source/Processors/Editors/RHD2000Editor.cpp @@ -26,10 +26,69 @@ RHD2000Editor::RHD2000Editor(GenericProcessor* parentNode, bool useDefaultParameterEditors=true) : GenericEditor(parentNode, useDefaultParameterEditors) { - desiredWidth = 600; + desiredWidth = 400; + + for (int i = 0; i < 4; i++) + { + HeadstageOptionsInterface* hsOptions = new HeadstageOptionsInterface(i); + headstageOptionsInterfaces.add(hsOptions); + + addAndMakeVisible(hsOptions); + } + } RHD2000Editor::~RHD2000Editor() { } + +void RHD2000Editor::resized() +{ + + int width = getWidth()/4 - 20; + + for (int i = 0; i < headstageOptionsInterfaces.size(); i++) + { + headstageOptionsInterfaces[i]->setBounds(10+i*width,30, width,getHeight()-50); + } +} + +// -------------------------------------------------------------------- + +HeadstageOptionsInterface::HeadstageOptionsInterface(int hsNum) : + hsNumber(hsNum) +{ + + switch (hsNumber) + { + case 0 : + name = "A"; + break; + case 1: + name = "B"; + break; + case 2: + name = "C"; + break; + case 3: + name = "D"; + break; + default: + name = "X"; + } + +} + +HeadstageOptionsInterface::~HeadstageOptionsInterface() +{ + +} + +void HeadstageOptionsInterface::paint(Graphics& g) +{ + g.setColour(Colours::lightgrey); + + g.fillRoundedRectangle(5,0,getWidth()-10,getHeight(),4.0f); + +} \ No newline at end of file diff --git a/Source/Processors/Editors/RHD2000Editor.h b/Source/Processors/Editors/RHD2000Editor.h index 93c35c385709cb8ac8abcc2733b8627e44d481cf..b6140c1c8f7f17900e78ada32edcbe38520f5d7e 100644 --- a/Source/Processors/Editors/RHD2000Editor.h +++ b/Source/Processors/Editors/RHD2000Editor.h @@ -35,21 +35,42 @@ */ +class HeadstageOptionsInterface; + class RHD2000Editor : public GenericEditor { public: RHD2000Editor(GenericProcessor* parentNode, bool useDefaultParameterEditors); - virtual ~RHD2000Editor(); + ~RHD2000Editor(); + + void resized(); private: + OwnedArray<HeadstageOptionsInterface> headstageOptionsInterfaces; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(RHD2000Editor); }; +class HeadstageOptionsInterface : public Component +{ +public: + HeadstageOptionsInterface(int hsNum); + ~HeadstageOptionsInterface(); + + void paint(Graphics& g); + +private: + + int hsNumber; + String name; + +}; + #endif // __RHD2000EDITOR_H_2AD3C591__ diff --git a/Source/Processors/SourceNode.cpp b/Source/Processors/SourceNode.cpp index 5cc8d17e478841b045063c13869c423ec5203b63..7d263a23128543de08e2f4e0a13033c5e12c0c01 100755 --- a/Source/Processors/SourceNode.cpp +++ b/Source/Processors/SourceNode.cpp @@ -198,7 +198,7 @@ AudioProcessorEditor* SourceNode::createEditor() if (getName().equalsIgnoreCase("RHD2000 USB Board")) { - editor = new RHD2000Editor(this, false); + editor = new RHD2000Editor(this, true); } else { diff --git a/Source/UI/InfoLabel.cpp b/Source/UI/InfoLabel.cpp index ea700760bdad4199f2f997fcb0b1cff51a405ab1..ca29355891cf4dd18a03c9fae0f6bb6afa3f462c 100755 --- a/Source/UI/InfoLabel.cpp +++ b/Source/UI/InfoLabel.cpp @@ -26,12 +26,14 @@ InfoLabel::InfoLabel() { - MemoryInputStream mis(BinaryData::misoserialized, - BinaryData::misoserializedSize, - false); - Typeface::Ptr tp = new CustomTypeface(mis); - labelFont = Font(tp); - labelFont.setHeight(24); + labelFont = Font("Paragraph", 24, Font::plain); + + // MemoryInputStream mis(BinaryData::misoserialized, + // BinaryData::misoserializedSize, + // false); + // Typeface::Ptr tp = new CustomTypeface(mis); + // labelFont = Font(tp); + // labelFont.setHeight(24); infoString = "Welcome to the Open Ephys GUI!\n \n" "To get starting using the GUI, drag a processor from the list "