| 493 | } |
| 494 | |
| 495 | void GRainbowAudioProcessorEditor::displayError(juce::String message) { |
| 496 | juce::DialogWindow::LaunchOptions options; |
| 497 | juce::Label* label = new juce::Label(); |
| 498 | label->setText(message, juce::dontSendNotification); |
| 499 | label->setColour(juce::Label::textColourId, juce::Colours::whitesmoke); |
| 500 | options.content.setOwned(label); |
| 501 | |
| 502 | juce::Rectangle<int> area(0, 0, 400, 300); |
| 503 | options.content->setSize(area.getWidth(), area.getHeight()); |
| 504 | options.dialogTitle = "gRainbow Error"; |
| 505 | options.dialogBackgroundColour = juce::Colour(0xff0e345a); |
| 506 | options.escapeKeyTriggersCloseButton = true; |
| 507 | options.useNativeTitleBar = false; |
| 508 | options.resizable = true; |
| 509 | |
| 510 | mDialogWindow = options.launchAsync(); |
| 511 | if (mDialogWindow != nullptr) { |
| 512 | mDialogWindow->centreWithSize(300, 200); |
| 513 | } |
| 514 | } |
| 515 | |
| 516 | /** Fast Debug Mode is used to speed up iterations of testing |
| 517 | This method should be called only once and no-op if not being used |