[Solved] hideWithEffect not working

Started by RGPaul, 30 March 2023, 10:38:34

RGPaul

Hey,

I try to use hideWithEffect and it is not working. After calling the function
panel->hideWithEffect(tgui::ShowEffectType::SlideToLeft, std::chrono::milliseconds(500));the Widget is still visible and not moving at all.

Are there any requirements for the function to work?

RGPaul

I also added:
panel()->onShowEffectFinish([=](tgui::ShowEffectType effect, bool visible) {
    std::cout << "animation finished" << std::endl;
});

If I call hideWithEffect twice (with some delay between) "animation finished" just shows up once and there is no animation shown.
After second call the panel widget isn't shown anymore but vanished without an animation.

RGPaul

I found the problem. My panel was drawn inside a custom widget. I had to passthrough updateTime. Now it works.  :)