Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseDiazRohena committed Dec 3, 2023
1 parent 7570f73 commit 1deac9f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/gui/panels/ValentineCenterPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,39 @@
#include "BinaryData.h"
#include "PluginProcessor.h"

#include "ValentineParameters.h"
#include "tote_bag/juce_gui/lookandfeel/LookAndFeelConstants.h"
#include "tote_bag/juce_gui/utilities/GraphicsUtilities.h"

namespace tote_bag
{
namespace valentine
{
namespace detail
{
// Get ratio of svg dimensions so we can correctly resize it.
inline constexpr auto kButtonWidth = 108.1f;
inline constexpr auto kButtonHeight = 201.84f;
inline constexpr auto kButtonRatio = kButtonWidth / kButtonHeight;

inline const juce::String kCrushSliderText = "CRUSH";
} // namespace detail

CenterPanel::CenterPanel (ValentineAudioProcessor& processor)
: borderLineThickness (0.0f)
, borderCornerSize (0.0f)
, crushSlider (detail::kCrushSliderText,
parameterID (VParameter::bitCrush),
processor.treeState)
, crushEnableButton (
juce::Drawable::createFromImageData (BinaryData::on_button_svg,
BinaryData::on_button_svgSize)
.get(),
juce::Drawable::createFromImageData (BinaryData::off_button_svg,
BinaryData::off_button_svgSize)
.get(),
parameterID (VParameter::crushEnable),
processor.treeState)
, valentineLogo (
juce::Drawable::createFromImageData (BinaryData::logo_218x40_svg,
BinaryData::logo_218x40_svgSize))
Expand Down
6 changes: 6 additions & 0 deletions src/gui/panels/ValentineCenterPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#pragma once

#include "tote_bag/juce_gui/components/widgets/DrawableParameterButton.h"
#include "tote_bag/juce_gui/components/widgets/LabelSlider.h"

#include <juce_gui_basics/juce_gui_basics.h>

class ValentineAudioProcessor;
Expand All @@ -26,6 +29,9 @@ class CenterPanel : public juce::Component
float borderLineThickness;
float borderCornerSize;

LabelSlider crushSlider;
DrawableParameterButton crushEnableButton;

std::unique_ptr<juce::Drawable> valentineLogo;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CenterPanel)
Expand Down

0 comments on commit 1deac9f

Please sign in to comment.