0 Favourites

How do I scroll inside a border

  • 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.

  • Are you looking to expand your current layout size?

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

  • 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.

  • 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?

  • 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?

  • 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'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,

  • >

    > 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)?

  • 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?

  • 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.

    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.

  • > 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?

    There is a blendmode example available from the new project dialog..

    Force own texture is a layer property, so the blendmode affects only that layer..

    effects and blendmode

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Hi figured this one out for you because i wanted to use it myself.

    Make your background drag-dropable then pin all your buttons and contents to the backround.

    Now restrict the x movement of your background. I did it by doing this :

    If background X > or < than current X position then set back to current position.

    (This will let you be able to scroll vertically but restricting it horisontally.

    Now just restrict your vertical max and minimum so that it cannot be dragged out of the layout as well.

    Hope this helps its a hack but it works .

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)