Item list with scroll and draggable items

Ciao! I am currently working on my first game and wondered if there was anyone who had any idea how to create a list of items scrolling on the Y axis but to be able to drag items out of the list and into a drop area.

I've managed to get a scrollable list up to the point of being scrollable and being able to drag items out of the list but as soon as I deviate from the X axis while dragging (i.e. dragging down and right to drop in a bag) it ends up scrolling the entire list.

I've tried limiting the scroll to within a section of the list but it continues to think the draggable object is part of the list even outside of the draggable area.

Example:
http://sudosushi.com/i/gamesalad/draggablelist.png

I'm dragging an item from the right into the left.

If you have any questions about my project, do feel free to ask.

- Lorenzo

Best Answer

Answers

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Perhaps the items in the list should be not be draggable. Could you spawn the appropriate item after the cursor (or finger) exits the scrolling section.
  • sudosushisudosushi PRO Posts: 4
    That's perfect. +1 to you, sir.
  • sudosushisudosushi PRO Posts: 4
    edited December 2012
    You couldn't point me in the right direction for changing the numbers to images could you? I'm making some progress but it's slow and I'm making a few mistakes and having to revert to save.

    Edit: I've worked out the actors draggable images but am stumped on the '1' \n '2' \n etc. I understand the logic/regex. '1' break '2' break etc but I'm just wondering if I could have images there instead.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    You could create one long skinny graphic that has all the 'items' on it. Then you would put the image into a long skinny actor. The single actor then slides up and down. (Just like the actor with the numbers in it.)
Sign In or Register to comment.