How to add a scrolling list

StoneDripStoneDrip Member Posts: 59
edited March 2012 in Working with GS (Mac)
I want to make a store for my game. In the store scene, i want to have a list of things that can be scroll through. How can i make that? Can't seem to find any videos on youtube...

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I would have all the elements that dont scroll on one layer and I would uncheck the scrollable box for that layer. This would be your bottom layer. Then have a layer that does scroll and put your items on this layer. On the top of your list make a bottom that points up and in this actor interpolate the scene camera up when touched. Have a button below your list and interpolate the camera down. When the camera changes the unscrollable stuff will stay put while the scrolling layer will appear to move (but really it is just the camera.

    Oh, you'll want to create a third non scrolling layer to put the up and down buttons on so that they are always available to scroll through the list. Put this layer on top of the list layer.
  • StoneDripStoneDrip Member Posts: 59
    Hey thanks! I did it! But a little problem, in the scene, i only had smaller rectangle that contains the items to scroll through, i had that but i can also scroll it when sliding outside of the rectangle.. How can i make the sliding/touch area the area of the rectangle?
  • StoneDripStoneDrip Member Posts: 59
    Any help? @tshirtbooth @scitunes
    I thought of constraining it to a certain x and y area, but can't figure out how to go about it.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    YOu could always download the free resource centre by DBA;

    http://www.deepblueapps.com/Deep_Blue_Ideas_Ltd./Home.html

    In there is a free template on scrolling lists
  • StoneDripStoneDrip Member Posts: 59
    @beefy_clyro I've seen that before, but that wasn't what i wanted in my project. I want it to be able to slide to scroll through. I managed that, but i can be sliding anywhere on the screen, i want it to only be able to slide in a certain area.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Wrap your sliding rules in another rule that says when mouse.x is > ??? ANd when mouse X is < ??
  • PaxtonPaxton Member Posts: 89

    @scitunes said:
    Wrap your sliding rules in another rule that says when mouse.x is > ??? ANd when mouse X is < ??

    I know I'm digging an old thread, but I really need this and I am unsure what you mean with the above.

    I have a list in my game that needs to be scrolled up and down using a swipe gesture. I cannot seem to find this kind of tutorial anywhere :(

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @Paxton, In the thread below I posted a sample scrolling menu. You might be able to use this for what you need. What I have posted is not a full tutorial or template by any means, it was just a code sample that was built off of @Socks 'fast constrain' code. It might be wise for you to check out the entire thread so you can see what is going on with both the 'fast constrain' and the sample code I posted.

    http://forums.gamesalad.com/discussion/75220/fast-constrain-linkmachine-v2

Sign In or Register to comment.