Skip to content

Commit

Permalink
Add prereleaseBuildHash to TooltipLabelUpdater
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-13 committed Feb 25, 2024
1 parent 7efcfd5 commit 3545ffa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions WECore/CoreJUCEPlugin/TooltipLabelUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down Expand Up @@ -110,6 +110,12 @@ namespace WECore::JUCEPlugin {
_defaultString += " (DEMO)";
}

// Preview build
if (!prereleaseBuildHash.isEmpty()) {
_defaultString += " ";
_defaultString += prereleaseBuildHash;
}

_targetLabel->setText(_defaultString, juce::dontSendNotification);
}

Expand Down

0 comments on commit 3545ffa

Please sign in to comment.