need a method / widget that either displays a set of images that can be chosen by the user

Hi,

I need some sort of menu, or slider / picker wheel, which can display a set of images that the user can scroll through and select to be placed as a physics object on the screen?

For example a set of images that are christmas decorations, that the user selects, then he places them at a point on a tree in the screen.

How would these images be stored in my program? especially as they are standard set of images chosen by users? Tables?

Please help

Greg [import]uid: 130366 topic_id: 33833 reply_id: 333833[/import]

A scrollView seems appropriate for this. I’d just store the images in my app with the rest of the images (assuming the user can’t create their own and you are not downloading them from somewhere) and have a big array/table with the filenames in your code.

Create the scrollView, then loop over your table doing display.newImageRect() calls storing the objects in a 2nd table, and shove each of them into the scrollView with a scrollView:insert(). You will have to calculate the positioning but that’s easy enough to multiple the for-loop’s i variable by the width of the images to figure out where to put them.
[import]uid: 199310 topic_id: 33833 reply_id: 134560[/import]

A scrollView seems appropriate for this. I’d just store the images in my app with the rest of the images (assuming the user can’t create their own and you are not downloading them from somewhere) and have a big array/table with the filenames in your code.

Create the scrollView, then loop over your table doing display.newImageRect() calls storing the objects in a 2nd table, and shove each of them into the scrollView with a scrollView:insert(). You will have to calculate the positioning but that’s easy enough to multiple the for-loop’s i variable by the width of the images to figure out where to put them.
[import]uid: 199310 topic_id: 33833 reply_id: 134560[/import]