Hi, I'm creating a menu that is hidden by default, and when i click a button, it is introduced with a nice showWithEffect().
The thing here is that the button is binded to the right of the menu, and it moves with it when it's showing. Everything is fine for now, the default width of the menu is it's real size and buttons are binded to 0% by default.
I also hide the menu with hideWithEffect(), and
the problem is here, after hideWithEffect is called it's original position is set back, and so my buttons are to the right again, floating in the middle of nowhere.
So, i want the buttons to actually stay at 0%, on the left, after the animation is over.
To achieve that i created a tiny class "Timer" that execute an action after a set amount of time, and i use that to set the buttons position to 0 after the same amount of time as the animation.
My solution seems kind of overkill, so is there an easier solution that i just didn't think of or not ?

Here is what's happening on the first link, and what i want to achieve on the second link (working with my solution):
First gif
https://gfycat.com/IdolizedOptimalCondor and the second gif
https://gfycat.com/GleamingWavyGodwitAlso, i'm actually creating the menus (3 of them in the gif) individually, by that i mean that each menu is totally independent from the others.
I actually did that for a reason. On my first try, i did a "MenuContainer" where i would put menus inside and hide them at choice, but i couldn't scroll a ScrollablePanel inside a panel and so i create them "individually".
Does ignoreMouseEvents() could actually help me scroll in a panel inside another panel ? Or another option that i didn't see ? I'm actually asking before trying again because i don't want to try everything again if there is no solution :x
Thanks and sorry for the long post.