Scrolling item menu?

We're creating a game that involves dragging objects from a scrolling menu onto the screen.

We've been looking all over the forums and code samples, but can't seem to find anything that does what we want. Can somebody please point us in the right direction? Maybe there are some keywords we should be searching for?

Basically, imagine a sticker or dress-up app, where you drag characters and objects onto a scene from a scrolling item menu that runs along the bottom or top of the screen.

Any help would be greatly appreciated!

Ok so in my game, there are objects at the top of the screen which you can drag wherever. Here is the code non-edited.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 local function bombTouch( event )
       if(bomb_counter > 0) then
                local t = event.target
        local phase = event.phase
        if "began" == phase then
                display.getCurrentStage():setFocus( t )
                t.isFocus = true
                t.x0 = event.x - t.x
                t.y0 = event.y - t.y
                bomb_bomb.xScale = .5; bomb_bomb.yScale = .5;
                
        elseif t.isFocus then
                if "moved" == phase then
                        t.x = event.x - t.x0
                        t.y = event.y - t.y0
                       
                elseif "ended" == phase or "cancelled" == phase then
                        display.getCurrentStage():setFocus( nil )
                        t.isFocus = false
                         bomb_counter = bomb_counter - 1;
                        if bomb_bomb then
                                bomb_bomb.x = _W/1.7; bomb_bomb.y = _H/9 - 5
                                bomb_bomb.xScale = .3; bomb_bomb.yScale = .3;
                        end     
                        
               end
               
        
        end

Thanks very much for that. I'm sure it will be useful...

However, we're still stuck at creating the actual menu.

I know Corona has a bunch of nice UI stuff - sliders, pickers, etc. But we haven't seen anything that actually works within the scene.

Another example would be a jigsaw puzzle app, where you have all the pieces displayed in a scrolling bar, then drag them out of the bar onto the puzzle outline.

What we need is a method for creating an onscreen scrolling menu containing images for the user to drag onto the "playing field."

Surely there's a way to do this.... right??

Or... What would also be good... A menu that hides or appears when you touch the screen (or a button). Is there a tutorial or sample code for in-game menu stuff like this?

Aw, come on, guys...

Why no answer? Is this just such an easy and obvious thing that I shouldn't have to ask?

Surely, someone else out there is trying to create an onscreen picker menu thingie.... or already has... and has some advice.

Should I be asking somewhere else?

I'm starting work on something similar tomorrow and I'll let you know if I figure something out. Buuuuut if there are any samples out there, it would be rad.

If you want to make an easy menu, look into the director class.

Hi-

Thanks, we have looked into the Director class, which looks wonderful for menu screens & transitions, etc.

However, we still have not found anything for doing a simple slider or popup menu inside a game.

Are we just asking the wrong question, maybe?

Okay, another example: An RPG where you can select from a number of items to equip in a scrolling menu. How would you do this???????

Maybe this thread will help. You want something like an inventory system?

http://developer.anscamobile.com/forum/2011/07/12/how-save-my-inventory

For your menu just create one and have it located off screen, when the button is pressed you use a transition to move it onto screen so it can have the effect of sliding open from the side or bottom. Is that what you mean?

Actually, somebody else was just asking for the same thing a couple of days ago, right here:

http://developer.anscamobile.com/forum/2011/07/15/slide-menu

I tried that solution, and it was just what we were looking for.

Thanks!
Adam

@skeiththe3rd
Which solution did you use to get this going? I'm trying to get a list if items (images).. on the side or bottom of the screen which can be selected and dragged onto the play area. (like you clearly explained in your jigsaw puzzle example)
Cheers
Richie

views:1557 update:2011/10/22 17:28:16
corona forums © 2003-2011