About Box Programming Help Question

Hello:
I am trying to make an about box that displays the build version, and the necessary VST attributions to legalize a plugin. I have tried several different approaches, and so far they haven’t produced any expected results (i.e. plugin crashes / no about box being shown at all). Any help/ideas on how to make said about box would be much appreciated.
BTW: These are the approaches I’ve used so far…

  • Make a splash screen that appears on startup (not ideal as I don’t think that you can reopen it)
  • Add a button that when pressed, launches a dialog window (this attempt produced a box that completely took over the UI and provided no way to exit apart from aborting the program)
  • Use a button to make a component visible using the listener method (this didn’t do anything).

Thanks for any help!

I am not sure why the method 2 and method 3 does not work unless you post some code here (at least method 3 should work). I would suggest juce::CallOutBox::launchAsynchronously since it will also automatically close itself when you click somewhere else.

I was able to get the callout box to work (there was a misunderstanding of how to program it on my part). However, I want something that floats free in the center of the plugin, instead of the box with an arrow pointing to the control that the callout box has (sorry for the unclarity of my first post). My attempt at making that kind of dialog in the center of the screen only filled my plugin window completely and gave no way to close it. Do you have any ideas about how this could be done?
Help is much appreciated
wAudio

I am not familiar with dialog window so I will only explain the CallOutBox way.

However, I want something that floats free in the center of the plugin

after you call juce::CallOutBox::launchAsynchronously, you can call updatePosition() to position the calloutbox at anywhere you like. And you can also call setArrowSize(0) to hide the arrow.

My attempt at making that kind of dialog in the center of the screen only filled my plugin window completely and gave no way to close it

If you resize the content which is given to the calloutbox, this should not happen.

Thanks for the help. I have one more question: the updatePosition() function appears to be updating the position to the bounds of the screen. I played around with this, trying to get it to fit within my plugin bounds by changing the nullptr for the main component to this, a pointer of my plugin’s main component, and changed the getScreenBounds() to getLocalBounds() or getBoundsInParent(). These workarounds proved to cause plugin crashes. How do I refer to the main component in a way that has no exceptions?
Thanks for your help so far.
P.S.
For reference here’s the code from my usage of CallOutBox::launchAsyncronously():

auto content = std::make_unique<About>();
auto& myBox = CallOutBox::launchAsynchronously(std::move(content), getScreenBounds(), nullptr);

This is my code where getParentComponent()->getParentComponent() is the main component. My plugin does not crash.

auto content = std::make_unique<CompCallOutBox>(parametersRef, uiBase);
content->setSize(juce::roundToInt(uiBase.getFontSize() * 7.5f),
                 juce::roundToInt(uiBase.getFontSize() * 9.f));

auto &box = juce::CallOutBox::launchAsynchronously(std::move(content),
                                                   getBounds(),
                                                   getParentComponent()->getParentComponent());
box.setLookAndFeel(&callOutBoxLAF);
box.setArrowSize(0);
box.sendLookAndFeelChange();
boxPointer = &box;

That solved the issue…thanks for taking the time to help.