From e1d465594344d16d087ab42d095a36d315adac90 Mon Sep 17 00:00:00 2001 From: Andreya-Autumn Date: Thu, 5 Dec 2024 01:21:38 +0100 Subject: [PATCH] fix --- src/MenuComponents/MenuBarComponent.h | 3 +-- src/MenuComponents/VisitorsComponent.h | 21 ++++++++------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/MenuComponents/MenuBarComponent.h b/src/MenuComponents/MenuBarComponent.h index 2daf822..b3c7d30 100644 --- a/src/MenuComponents/MenuBarComponent.h +++ b/src/MenuComponents/MenuBarComponent.h @@ -43,8 +43,7 @@ struct MenuBarComponent : juce::Component visButton->setToggleState(false, juce::dontSendNotification); std::string bruh[1] = {"names of groups here eventually"}; - visC = std::make_unique(processor.currentVisitors->dimensions, - processor.numVisitorGroups, bruh); + visC = std::make_unique(processor.numVisitorGroups, bruh); addAndMakeVisible(*visC); visC->setVisible(false); diff --git a/src/MenuComponents/VisitorsComponent.h b/src/MenuComponents/VisitorsComponent.h index 6e50ec0..7f1420e 100644 --- a/src/MenuComponents/VisitorsComponent.h +++ b/src/MenuComponents/VisitorsComponent.h @@ -21,7 +21,7 @@ //============================================================================== struct VisitorsComponent : public juce::Component { - VisitorsComponent(int *v, int ng, std::string names[]) + VisitorsComponent(int ng, std::string names[]) { juce::Colour n{juce::Colours::transparentWhite}; juce::Colour o{juce::Colours::ghostwhite.withAlpha(.15f)}; @@ -30,19 +30,14 @@ struct VisitorsComponent : public juce::Component circle.addEllipse(0, 0, diameter, diameter); - for (int i = 0; i < 12; ++i) + for (int i = 0; i < 7; ++i) { - dd[i] = v[i]; - - if (i < 7) - { - commas.add(new juce::ShapeButton("option" + std::to_string(i), n, o, o)); - commas[i]->setShape(circle, true, true, false); - addAndMakeVisible(commas[i]); - commas[i]->setRadioGroupId(2); - commas[i]->onClick = [this] { selectComma(); }; - commas[i]->setClickingTogglesState(true); - } + commas.add(new juce::ShapeButton("option" + std::to_string(i), n, o, o)); + commas[i]->setShape(circle, true, true, false); + addAndMakeVisible(commas[i]); + commas[i]->setRadioGroupId(2); + commas[i]->onClick = [this] { selectComma(); }; + commas[i]->setClickingTogglesState(true); } miniLattice = std::make_unique(dd, this, 18);