From 3545ffadabf28c1d58e9b9bc9ab1af5ef7fb0b85 Mon Sep 17 00:00:00 2001 From: jd-13 Date: Sun, 25 Feb 2024 15:34:15 +0000 Subject: [PATCH] Add prereleaseBuildHash to TooltipLabelUpdater --- WECore/CoreJUCEPlugin/TooltipLabelUpdater.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/WECore/CoreJUCEPlugin/TooltipLabelUpdater.h b/WECore/CoreJUCEPlugin/TooltipLabelUpdater.h index e965f68..76ae5c4 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, bool isDemo = false); + inline void start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, bool isDemo = false, const juce::String& prereleaseBuildHash = ""); /** * Must be called before the given label is destructed. @@ -72,7 +72,7 @@ namespace WECore::JUCEPlugin { _defaultString = ""; } - void TooltipLabelUpdater::start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, bool isDemo) { + void TooltipLabelUpdater::start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, bool isDemo, const juce::String& prereleaseBuildHash) { _targetLabel = targetLabel; _defaultString = JucePlugin_Name; @@ -110,6 +110,12 @@ namespace WECore::JUCEPlugin { _defaultString += " (DEMO)"; } + // Preview build + if (!prereleaseBuildHash.isEmpty()) { + _defaultString += " "; + _defaultString += prereleaseBuildHash; + } + _targetLabel->setText(_defaultString, juce::dontSendNotification); }