Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to make a drop down menu? (Example: the translucent iOS 7 notification center)

Hello there!

So for my landscape game that I am working on, I wanted to make a drop down menu.
(Sort of like the iOS 7 notification center drop down screen)

Heres the small difference of what I am looking for:

1. User clicks a button called "Stats"
- Then: The translucent screen with different actors/numbers interpolate down.
I know how to do this part but the next part is where it gets a little harder.

2. When the user swipes up - the window and all the words go up at the speed of the swipe - so the user is now at the original screen.

I'm trying to bring an iOS 7 factor into my game and feel like this would be a kinda cool thing to do. The part I'm not clear about is swiping up, making the screen and all the actors follow fluidly.

Any help/advice would be appreciated!


  • kinzuakinzua Posts: 554Member
    edited October 2013
    @NGames to make the difference you looking for in no.2 .. you can inspire yourself from tshirtbooth's swipe menu demo. You'll find you answers in there.

    What i can suggest you to do is you can constrain the Y pos of each actor with relation to touch down. For e.g.. take touchY as reference and record the value as STARTy and then constrain CurrentY to touchY. Now if, startY<CurrentY then an actor on dropdown can have its position constrained as self.positionY=(selfStartY+(touch.StartY-CurrentY))*incrementSpeedVar.

    Of course, you'll have to polish it a lot like apple does. For instance, once the 'dropdown' is back in 'hiding' you deactivate swipe. Or after touch is released you maintain the velocity of swipe and send the drop down back in place. Would love to see what you come up with.
  • marplumarplu Posts: 412Member, PRO
    You could use the dropdown-grabber to interpolate the camera origin to the touch position (y-only), so that the speed of the grab (=the position of your finger) changes the camera, and thus the scene.
Sign In or Register to comment.