kotcrab / vis-ui

libGDX UI toolkit
Apache License 2.0
725 stars 130 forks source link

Can't switch stage before file chooser fades out #257

Open StrongJoshua opened 7 years ago

StrongJoshua commented 7 years ago

I am using FileChooser to open a file, and once the file is opened, my program switches to another stage. However, this has the effect of not allowing the FileChooser to fade out properly (so when I then try to fade it in again in this subsequent stage, it immediately fades back out due to the queued actions). I have tried just clearing its actions, but that results in it being un-touchable since that's what the VisWindow's fadeOut() function does.

kotcrab commented 7 years ago

I'm not sure if stage2d actors are meant to be moved between stages. Not seeing any good fix for this. You can use these workarounds:

StrongJoshua commented 7 years ago

The workaround I ended up using is just adding the file chooser to the next stage in its constructor, which has the added cool effect of it seeming to persist between the two stages and fade out during the transition. But I agree, there is no good fix, I just wanted to let you know in case you wanted to change it.