mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ScopedMessageBox: Replace old AlertWindow uses with new API
This commit is contained in:
parent
79ed81c24a
commit
39a731de46
55 changed files with 893 additions and 677 deletions
|
|
@ -195,7 +195,13 @@ private:
|
|||
addAndMakeVisible (textButton);
|
||||
|
||||
shapeButton.setShape (getJUCELogoPath(), false, true, false);
|
||||
shapeButton.onClick = [] { AlertWindow::showMessageBoxAsync (MessageBoxIconType::InfoIcon, "Alert", "This is an AlertWindow"); };
|
||||
shapeButton.onClick = [this]
|
||||
{
|
||||
auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::InfoIcon,
|
||||
"Alert",
|
||||
"This is an AlertWindow");
|
||||
messageBox = AlertWindow::showScopedAsync (options, nullptr);
|
||||
};
|
||||
shapeButton.setHasFocusOutline (true);
|
||||
addAndMakeVisible (shapeButton);
|
||||
}
|
||||
|
|
@ -250,6 +256,7 @@ private:
|
|||
Colours::darkorange,
|
||||
Colours::darkorange.brighter (0.5f),
|
||||
Colours::darkorange.brighter (0.75f) };
|
||||
ScopedMessageBox messageBox;
|
||||
|
||||
//==============================================================================
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonsComponent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue