Scroll bars if content is overflowing

Get help using Construct 2

Post » Fri May 01, 2015 12:50 pm

Is there a way to make the screen scroll (down or sideways) if the current layers content is outside the viewport size?
I suppose a bit like a web browser.

Basically, I have my levels inside an array and calling a foreach to print a button for each level. The levels may overlap the current viewport size.
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Fri May 01, 2015 4:02 pm

do you mean like a menu system?

you can do it, but you have to "fake" it. Meaning, not actually scroll the screen, but rather scroll the items.

so if your window only can fit 5 items.. and you have 7 items.

you start with:

1
2
3
4
5

and if the player pushes the down direction once, you show:

2
3
4
5
6

and pushes down again show:

3
4
5
6
7

so you can just make empty box slots on your screen and On Start of Layout loop through them and put the level sprites on top of them depending on where the player is in the menu system.
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Fri May 01, 2015 5:46 pm

Ah, I see now.

Thanks very much for your help.
B
9
S
3
Posts: 146
Reputation: 1,150


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 9 guests