Skip to content

Commit

Permalink
Include demo in tooltip string
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-13 committed Jan 6, 2024
1 parent 391f923 commit 9b1ad08
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 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);
inline void start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, bool isDemo = false);

/**
* Must be called before the given label is destructed.
Expand All @@ -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;
Expand Down Expand Up @@ -103,6 +103,11 @@ namespace WECore::JUCEPlugin {
#error "Unknown arch"
#endif

// Demo
if (isDemo) {
_defaultString += " (DEMO)";
}

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

Expand Down

0 comments on commit 9b1ad08

Please sign in to comment.