Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / How to make scrolling menu by swiping?

Author
Message
theUsual
8
Years of Service
User Offline
Joined: 13th Jul 2015
Location: Norway
Posted: 27th Jul 2015 22:51
As the title says, I want to make a classic menu where I can scroll up/down, or move to another menu by swiping left/right. Thanks
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 29th Jul 2015 00:36
Here's a starter for ten:



You basically want to look at the look at the GetRawTouch... commands.

To actually select something off the menu, you'll need to check if the RawTouchType is a 1 (ie screen is pressed then release within 1 second) and then use the GetRawTouchStartX() and GetRawTouchStartY() values to detect collision with the sprite or text if you want to use text in the menu rather than sprites.

Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB
lmb
8
Years of Service
User Offline
Joined: 3rd Apr 2015
Location:
Posted: 30th Jul 2015 13:45
Eventually I can add to the forum rather than take advice. Here is my take on "29 games" help. I will admit it took me ages but I have the time. This code works on my phone via AGK2 player. I only added a little bit to the code but it now moves across a set width.




lmbeeee
theUsual
8
Years of Service
User Offline
Joined: 13th Jul 2015
Location: Norway
Posted: 31st Jul 2015 01:49
Wow guys, thank you! I'll use this code for sure.

Login to post a reply

Server time is: 2024-03-28 08:26:50
Your offset time is: 2024-03-28 08:26:50