How do I scroll inside a border

Get help using Construct 2

Post » Sat Oct 10, 2015 1:23 am

So I have this box/boarder inside my layout, and i want to scroll the contents that are inside that box.

1) So, how do I fit more than what the screen space/layout size can display? eg layout is 1920 pixels tall, and the "contents" takes up a height of 3000 pixels when stacked on top of each other/listed.
2) And then how do I only scroll inside that box to go through all those contents, without scrolling the actual layout page. I have followed Predbites "Dragging the screen with mouse and touch" tutorial, but that drags the entire layout.

If I worded it badly, the only example I can find is on the "Tap Titans" game app on the play store/app store. You can scroll up/down within a box to choose navigate your heroes etc.

Thanks in advance.
B
6
Posts: 40
Reputation: 336

Post » Sat Oct 10, 2015 4:01 am

Are you looking to expand your current layout size?

So just moving the window isn't what you want?
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,068

Post » Sat Oct 10, 2015 4:05 am

Use an array.

To scroll right copy the end of X, to X,0, then pop the back of X and redraw the matrix.

Here is how to draw a matrix from an array.:
https://www.scirra.com/tutorials/360/ge ... m-tile-map

You can later load and save the array as a .json file. That way you can use local storage to save the players place if needed.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Sat Oct 10, 2015 3:45 pm

antares330 wrote:Are you looking to expand your current layout size?

So just moving the window isn't what you want?

Yeah I'm probably really bad at explaining this. But if you don't mind, could you download the Tap Titans game app off the play store and see what I meant?
B
6
Posts: 40
Reputation: 336

Post » Sat Oct 10, 2015 3:49 pm

jojoe wrote:Use an array.

To scroll right copy the end of X, to X,0, then pop the back of X and redraw the matrix.

Here is how to draw a matrix from an array.:You can later load and save the array as a .json file. That way you can use local storage to save the players place if needed.

I'm way too much of a beginner to know what you mean, ha. But I'll give it a read+look around into this matrix thing and see how I get on first.

But can I just confirm that this will produce a result of what I meant such as in the app Tap Titans?
B
6
Posts: 40
Reputation: 336

Post » Sat Oct 10, 2015 3:52 pm

I guess you could put the menu on a layer with blendmode and force own texture..
Another way would be creating and destroying the menu-items dynamicaly..
A combination of both would ofcourse also be possible :)

It all depends on your needs..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 10, 2015 5:09 pm

Knovolt wrote:I'm way too much of a beginner to know what you mean, ha. But I'll give it a read+look around into this matrix thing and see how I get on first.

But can I just confirm that this will produce a result of what I meant such as in the app Tap Titans?


Not sure what game you are talking about. This is just a way to scroll large numbers of things without drawing everything in the matrix.

My crappy English probably does not help. It is only 3 little things you need to do. Here is a load and save system:
https://mega.nz/#!kAxBQRTJ!ZqM9eHA0R-q4 ... lPRiPPXQFA

Look at the part where the user clicks the green up and down buttons to scroll the list.

To try this, just run the capx, and type a few entries in and click the save button. Then you can click the up and down arrows and see the scroll.

Can use the same trick to scroll through large amounts of text,
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Sat Oct 10, 2015 5:15 pm

jojoe wrote:
Knovolt wrote:I'm way too much of a beginner to know what you mean, ha. But I'll give it a read+look around into this matrix thing and see how I get on first.

But can I just confirm that this will produce a result of what I meant such as in the app Tap Titans?


Not sure what game you are talking about. This is just a way to scroll large numbers of things without drawing everything in the matrix.

My crappy English probably does not help. It is only 3 little things you need to do. Here is a load and save system:Look at the part where the user clicks the green up and down buttons to scroll the list.

To try this, just run the capx, and type a few entries in and click the save button. Then you can click the up and down arrows and see the scroll.

Can use the same trick to scroll through large amounts of text,

It gives me an error when opening, that it was made from a newer version of Construct 2 (214), and that my version is v212.2. It asks me to find a newer version, but 212.2 seems like the latest via the download page.

I think you're on a beta version, and I'm not. Do you mind converting/saving it for older versions (if possible)?
Last edited by Knovolt on Sat Oct 10, 2015 5:20 pm, edited 1 time in total.
B
6
Posts: 40
Reputation: 336

Post » Sat Oct 10, 2015 5:17 pm

LittleStain wrote:I guess you could put the menu on a layer with blendmode and force own texture..
Another way would be creating and destroying the menu-items dynamicaly..
A combination of both would ofcourse also be possible :)

It all depends on your needs..

Could you link me to some tutorials/read-ups for what is blendmode+force own texture?
B
6
Posts: 40
Reputation: 336

Post » Sat Oct 10, 2015 5:25 pm

Here's the picture i'm referring to. Inside this little boarder, I can swipe/scroll up+down to navigate the in-game characters. And there is about 30 characters listed within that boarder.

Image


Alternatively, this link which I found somewhere on the Scirra forums, (forgot where), demos what I'm talking about too (kinda). There is a huge numbers list that seems to be inside this invisible boarder. Scrolling with the sidebar navigates you up+down.

dl.dropboxusercontent.com/u/5779181/C2Demo/scrollable_text/index.html

I'm wondering how to do that, (having such a large list inside a smaller boarder), and to navigate up+down by swiping/scrolling with mouse instead of using a sidebar.
Last edited by Knovolt on Sat Oct 10, 2015 5:40 pm, edited 2 times in total.
B
6
Posts: 40
Reputation: 336

Next

Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, Yahoo [Bot] and 48 guests