From 9b1ad084f4a2d437010c4a74af0f56b41a4387c4 Mon Sep 17 00:00:00 2001 From: jd-13 Date: Sat, 6 Jan 2024 20:55:35 +0000 Subject: [PATCH] Include demo in tooltip string --- WECore/CoreJUCEPlugin/TooltipLabelUpdater.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/WECore/CoreJUCEPlugin/TooltipLabelUpdater.h b/WECore/CoreJUCEPlugin/TooltipLabelUpdater.h index 383f8b4a..1b02306b 100644 --- a/WECore/CoreJUCEPlugin/TooltipLabelUpdater.h +++ b/WECore/CoreJUCEPlugin/TooltipLabelUpdater.h @@ -47,7 +47,7 @@ namespace WECore::JUCEPlugin { * Starts updating the label as necessary, displaying build information when not showing a * tooltip. */ - inline void start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat); + inline void start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, bool isDemo = false); /** * Must be called before the given label is destructed. @@ -70,7 +70,7 @@ namespace WECore::JUCEPlugin { _defaultString = ""; } - void TooltipLabelUpdater::start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat) { + void TooltipLabelUpdater::start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, bool isDemo) { _targetLabel = targetLabel; _defaultString = JucePlugin_Name; @@ -103,6 +103,11 @@ namespace WECore::JUCEPlugin { #error "Unknown arch" #endif + // Demo + if (isDemo) { + _defaultString += " (DEMO)"; + } + _targetLabel->setText(_defaultString, juce::dontSendNotification); }