PopupMenu: change PopupMenuCompletionCallback (or any other way to animate removal of MenuWindows?)

Hi!

I’m trying to animate how MenuWindow instances are removed that are created via PopupMenu::showWithOptionalCallback(…) that is called from PopupMenu::showMenuAsync(). In that function, an instance of a PopupMenuCompletionCallback is created and attached to the created MenuWindow. This call back seems responsible for removing the MenuWindow(s) that the PopupMenu creates (by calling reset()).

The MenuWindow is private and I can’t access or override it easily; also the PopupMenuCompletionCallback is a local variable that I cannot change.

As a result, when the popup menu is dismissed, the MenuWindow components are gone even before I can try to access them via the ModalComponentManger::Callback that I can set upon creation of the MenuWindow.

Is there a way we can control how the MenuWindows are dismissed ourselves, for example by providing our own PopupMenuCompletionCallback? I just want to run a simple animation/fade out instead of the instantaneous reset that is happening now?