Hey there,
I'am new at working with construct. My question is, how I can greate a menu which is sliding in when i press a button. This is not that difficult. But i want to rotate the button 180�(arrow) and if someone press this button again, the menu will silde back out of the layout.
It would be great if some could help me out with an easy example! Thanks a lot!
Probably pin the objects (pin behavior) that make up the menu to a sprite (menu background for example) and only move this one sprite in and out.
Dunno what you mean with the button. You can use an instance or global variable to check whether it should spin or not.
Develop games in your browser. Powerful, performant & highly capable.
Thanks for your respone.
If i press this button
Link to picture 1
I should open the side menu and slide in like on this picture.
Link to picture 2
How you can see the button rotate 180�. Now i if I press this button again, i should be slide out and look like the picture 1. Sorry its difficult to explain for me in englisch..
I hope you know what i mean. Maybe you can help me out with a example file. Thanks!
here:
s000.tinyupload.com/index.php
edit:
sry, the first version has inconsistencies with the angle.
This fixes it:
mindfaQ was faster... but I've done an example too ^^
Menu-SlideIn.capx
Awesome! Big thanks to both of you! Now it works perfectly! :)
You could also try adding Lerp(Self.X , "destination X" , 0.2)
0.2 is the speed and self.X is the starting point to "destination X"
This will making the slide in and out look smoother and elegant ;)