1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

ScopedMessageBox: Replace old AlertWindow uses with new API

This commit is contained in:
reuk 2023-02-22 20:54:45 +00:00
parent 79ed81c24a
commit 39a731de46
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
55 changed files with 893 additions and 677 deletions

View file

@ -279,13 +279,14 @@ private:
return legacyStartChannel.getText().getIntValue() <= legacyEndChannel.getText().getIntValue();
}
void handleInvalidLegacyModeParameters() const
void handleInvalidLegacyModeParameters()
{
AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
"Invalid legacy mode channel layout",
"Cannot set legacy mode start/end channel:\n"
"The end channel must not be less than the start channel!",
"Got it");
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::WarningIcon,
"Invalid legacy mode channel layout",
"Cannot set legacy mode start/end channel:\n"
"The end channel must not be less than the start channel!",
"Got it");
messageBox = AlertWindow::showScopedAsync (options, nullptr);
}
Range<int> getLegacyModeChannelRange() const
@ -338,6 +339,8 @@ private:
ComboBox numberOfVoices;
Label numberOfVoicesLabel { {}, "Number of synth voices"};
ScopedMessageBox messageBox;
static constexpr int defaultMemberChannels = 15,
defaultMasterPitchbendRange = 2,
defaultNotePitchbendRange = 48;