Show/Hide animations

Show/Hide Animations

Do you want your widget to fly in from the side or fade out? TGUI supports these animations out of the box!

All you have to do is tell the showWithEffect or hideWithEffect function what type of animation you want and how long the animation should last.

button1->showWithEffect(tgui::ShowAnimationType::Fade, sf::milliseconds(800));
button2->showWithEffect(tgui::ShowAnimationType::SlideFromLeft, sf::milliseconds(500));
button3->hideWithEffect(tgui::ShowAnimationType::SlideToBottom, sf::milliseconds(500));