Download

How to call a destructor

I have a simple widget superclass that i want to fade in and fade out from a simple animation. The fade in is easy using the constructor, but the destructor code didnt work because the widget was removed from the viewport before the code ran, so I spun it off into it own event to call before the widget is removed - but how do I call the deconstruct event after this event has finished from WITHIN this widget class, ideally at the end of rthe CE_Fadeout event.

I had some issues with trying to delay the removeallwidgets node from my main code, because it interferes with the timing of other things, so I just need to destroy the widget here when the animation has finished.