How do I implement a "sliding out of / into" effect on a settings menu similar to that in Angry Birds?

Posted by VictorB on Game Development See other posts from Game Development or by VictorB
Published on 2014-03-11T21:20:20Z Indexed on 2014/06/12 3:55 UTC
Read the original article Hit count: 218

Filed under:
|

I'm trying to implement a settings menu component similar to that in Angry Birds - a button control that makes an options menu slide out of it and back into it when clicked on.

I use scene2d.ui to build the UI components: a Button in a Table to implement the button control, a Table to implement the options menu, and a Stack to lay these out one on top of the other and at this moment I have the following behavior:

  1. When the user hits the button control for the first time, then the alpha of the table component is set to 1;
  2. When the user hits the button control the second time, then the alpha of the table component is set to 0;
    And so on.

Any ideas how I can get the sliding out of and into effect on user clicks with libgdx? Similar to what Angry Birds provides.

Maybe using the TweenEngine, actions, interpolations, combinations of these?

Thanks in advance.

© Game Development or respective owner

Related posts about java

Related posts about libgdx