swype from layout to layout - android

Get help using Construct 2

Post » Sun Jun 03, 2012 5:35 pm

Hello, just wondering if its possible to swype left or right on a touch device from one layout to another? If anyone knows a way or if this isnt possible could you let me know? Cheers
B
11
S
1
G
2
Posts: 14
Reputation: 736

Post » Sun Jun 03, 2012 10:44 pm

I'm sorry, but I'm fairly sure this is impossible at this time as you can only have one layout open at a time, so the transition won't be what you want it.
However, you could make it swipe a 'covering' across, which covers the screen in half the swipe, changes layout, then uncovers the second layout in the second half of the swipe. This can be a cool effect and work well if done correctly.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Jun 04, 2012 9:47 am

Ok man cheers for the reply! Ill just stick to buttons at the mo then far easier lol! Cheers again tho bud
B
11
S
1
G
2
Posts: 14
Reputation: 736

Post » Mon Jun 04, 2012 3:02 pm

If your layouts will be the same size as your window, you can make a large layout, put your "screens" in a grid, and scroll from one to the other.

If you need scrolling within each layout then you can fake a layout swipe using the Canvas plugin. You basically paste the screen into a global Canvas, then go to the next layout, position the Canvas to the side of the screen, and scroll from the center of it to the center of the layout start position.

Swipe layouts exampleAnimmaniac2012-06-04 20:08:27
Scirra Employee
B
129
S
45
G
15
Posts: 705
Reputation: 15,413

Post » Mon Jun 17, 2013 3:35 pm

@Animmaniac,

Your example is really good, and does almost exactly what I want. But I don't want to use the canvas object and separate layouts.

I want to create a large layout (5000 x 5000) and a smaller window (1000 x 1000). When the player swipes, I want the window to scroll to the next section of the layout, so it seems as if its moving through sections of a grid!

Not sure if that makes any sense, but I've tried a few things and failed.

Do you have any advice or ideas you could offer.

Thanks


Pantaloons2013-06-17 15:37:05
B
8
S
2
G
1
Posts: 63
Reputation: 880


Return to How do I....?

Who is online

Users browsing this forum: fredriksthlm, Yahoo [Bot] and 17 guests