Skip to content

Commit

Permalink
start the info menu
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseDiazRohena committed Feb 25, 2024
1 parent f8ba7ba commit d301f2c
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ set(SourceFiles
libs/tote_bag/dsp/EnvelopeDetector.cpp
libs/tote_bag/dsp/Saturation.cpp

libs/tote_bag/juce_gui/components/panels/InfoPanel.h
libs/tote_bag/juce_gui/components/panels/PresetPanel.h
libs/tote_bag/juce_gui/components/panels/VerticalMeterPanel.h
libs/tote_bag/juce_gui/components/panels/InfoPanel.cpp
libs/tote_bag/juce_gui/components/panels/PresetPanel.cpp
libs/tote_bag/juce_gui/components/panels/VerticalMeterPanel.cpp

Expand Down
30 changes: 30 additions & 0 deletions libs/tote_bag/juce_gui/components/panels/InfoPanel.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// 2024 Tote Bag Labs

#include "InfoPanel.h"

#include "tote_bag/juce_gui/lookandfeel/LookAndFeelConstants.h"

namespace tote_bag
{

InfoPanel::InfoPanel (std::function<void()> mouseUpCallback)
: onMouseUp (mouseUpCallback)
{
}

InfoPanel::~InfoPanel()
{
}

void InfoPanel::paint (juce::Graphics& g)
{
g.setColour (colours::plainWhite);
g.fillRect (getBounds());
}

void InfoPanel::mouseUp (const juce::MouseEvent& e)
{
onMouseUp();
}

} // namespace tote_bag
31 changes: 31 additions & 0 deletions libs/tote_bag/juce_gui/components/panels/InfoPanel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// 2024 Tote Bag Labs

#pragma once

#include "generated/version.h"

#include <juce_gui_basics/juce_gui_basics.h>

#include <functional>

namespace tote_bag
{

class InfoPanel : public juce::Component
{
public:
InfoPanel (std::function<void()> mouseUpCallback);

~InfoPanel() override;

void paint (juce::Graphics& g) override;

void mouseUp (const juce::MouseEvent& e) override;

private:
std::function<void()> onMouseUp;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InfoPanel)
};

} // namespace tote_bag

0 comments on commit d301f2c

Please sign in to comment.