From 2db1bbdc0f49a845b5a7e834be9135aa07ddb004 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 9 Aug 2021 08:51:58 +0100 Subject: [PATCH] Add missing AlertWindow::showNativeDialogBox() implementation that was removed in 551d7b9c --- modules/juce_gui_basics/windows/juce_AlertWindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/juce_gui_basics/windows/juce_AlertWindow.cpp b/modules/juce_gui_basics/windows/juce_AlertWindow.cpp index 8f4c8e4c4f..e7d50c07b2 100644 --- a/modules/juce_gui_basics/windows/juce_AlertWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_AlertWindow.cpp @@ -669,6 +669,17 @@ int AlertWindow::show (const MessageBoxOptions& options) AlertWindowInfo info (options, nullptr, Async::no); return info.invoke(); } + +bool AlertWindow::showNativeDialogBox (const String& title, + const String& bodyText, + bool isOkCancel) +{ + if (isOkCancel) + return NativeMessageBox::showOkCancelBox (AlertWindow::NoIcon, title, bodyText); + + NativeMessageBox::showMessageBox (AlertWindow::NoIcon, title, bodyText); + return true; +} #endif void AlertWindow::showAsync (const MessageBoxOptions& options, ModalComponentManager::Callback* callback)