fadeOut Component question

Juce Friends,

I’ve found the fadeOut component call to look quite compelling but I don’t know how to use it when you change between components. Here is my code below. The problem is that when I have the setContentComponent enabled, the new component immediately appears and the old one does not fade out. Is there a way to have the component fade out and after the visually stunning fade out, then the new component is set to the DocumentWindow object via the setContentComponent call?

if (result == 1) {
// Try to fade out the current AuthComponent but the fade out effect isn’t working when the setContentComponent is running

            MainMenuComponent* themenu;
            themenu = new MainMenuComponent();

            theMainWindow->setName(T("Welcome to LAVA"));

} else {

There’s no way to do that automatically - the whole point of the fade out component is that it doesn’t block the message thread, it just fades out while your code gets on with it.

One of the things that I’m planning to be able to do with my new graphics code is to give components an opacity, so you could easily animate things like this with a timer, but am not quite there yet…

Thanks Jules. I’ll look forward to the new code and being able to play with those new animations.