What would be the best way to make a simple “menu”/“toolbar” that swipes from the top when a swipe event occurs?
I want something like this:
When You swipe down the menu will show up, when You swipe up the menu hides. The menu will contain some sprites that will help You in navigation. Any ideas?
You could implement the menu as a layer (it will be easier to transfer data between the menu and the game) or you could make it a scene and do pushscene() to open it and popscene() to close it.
Yes, first idea is you want to get to the new eventDispatcher and to the swipe gesture.
Then load your Sprites, position these and assign to a touchEvent.
To get it actually “sliding” out, you will need to create a moveTo action or something similar for the Y point.
These are just some ideas, that you’ve asked for.
If you make it a scene you’ll have to use TransitionSlideInT although I’m not sure how you would do the slide out as there’s no transition for that. Maybe you can make your own
Now its 2.2.2 (not updated to 3.6), but go ahead and adapt it.
The logic is the same here. Check how the menu buttons slide in, when you start the game. It does exactly what you try to do, only with other sprites.
Also included in this demo:
Parallax scrolling
Endless scrolling background
Sprite positioning
Sprite rotation
Sprite movement
Sound effects
Background music loop
Bitmap fonts usage
Hope that gives you a better understanding. @i__d__k As i said before, this could be done with the new eventDispatcher and simple sprite movement to create the “slide” animation.
Yes if it’s implemented as a layer, but not if it’s implemented as a scene because there can only be one running scene at a time.
It’s definitely a better idea to use a layer
Ofcourse you dont owe me nothing because what you had in that repo is simply NOTHING.
ha ha…
I have been asking politely only.
May be you should keep your head calm and listen to others, I was not blaming you.
Just simply asking, as you are posting under the question, the answers should have some relation, other than that we have Programmers Guide ( if you have ever heard of it) to enrich our knowledge.
Ofcourse you dont owe me nothing because what you had in that repo is simply NOTHING.
What? Ok, please then go ahead and make a better demo, then share it with us. Please. I am sorry nobody wrote that game for you that you’re trying to write for one year now. That’s the real joke here. What are you talking about?
we have Programmers Guide ( if you have ever heard of it)
Currently, i am working with @slackmoehrle and @ricardo on it, writing new articles and redesigning the UI. 3.7 is going to be awesome, you have my word on this.