Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions rendererplugin/src/screens/EditPresentationScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,22 @@ EditPresentationScreen::EditPresentationScreen(
addMixPresentationButton_(IconStore::getInstance().getPlusIcon()) {
setLookAndFeel(&lookAndFeel_);
setWantsKeyboardFocus(true);

mixPresentationRepository_->registerListener(this);

// Configure adding mix presentations
addMixPresentationButton_.setCyanLookAndFeel();
addMixPresentationButton_.setButtonOnClick(addMixPresentation);
addMixPresentationButton_.setButtonOnClick([this]() {
// Add a new mix presentation
MixPresentation presentation(
juce::Uuid(), "My Mix Presentation" + juce::String(numMixes_ + 1), 1,
LanguageData::MixLanguages::Undetermined, {});
mixPresentationRepository_->add(presentation);

// Log the addition of a new mix presentation
LOG_ANALYTICS(
RendererProcessor::instanceId_,
"Adding new mix presentation: " + presentation.getName().toStdString());
});

// Update mix presentation information
updateMixPresentations();
Expand Down
1 change: 0 additions & 1 deletion rendererplugin/src/screens/EditPresentationScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class EditPresentationScreen : public juce::Component,
void updateTabButtonBounds(const juce::Rectangle<int>& mixEditingBounds);
void updateMixPresentations();
void updatePresentationTabs();
std::function<void()> addMixPresentation;

void valueTreeChildAdded(juce::ValueTree& parentTree,
juce::ValueTree& childWhichHasBeenAdded) override;
Expand Down