Page 1 of 1

How would I make a radial menu in live code?

Posted: Tue Aug 02, 2011 6:39 pm
by wolfkillshepard
Hey my name is Christian and I am currently working on a project on which we have a dashboard start screen and on this screen we wanted to have a radial menu that would take you to different parts of the app.

-We want pieces of the radial menu to be accessible as you hold down you finger and drag it across the "pieces of pie" if you will.

-When you lift you finger while it has a piece selected you will open that option.

-When you lift your finger while it is in the center of the radial or anywhere off of a piece nothing will happen, the user will not navigate.

If anyone has any idea of how to get this to work please reply

-Christian Spring

Re: How would I make a radial menu in live code?

Posted: Tue Aug 02, 2011 8:28 pm
by BvG
mouseDown
mouseUp
mouseRelease
mouseWithin
mouseMove
the target
the mouseControl
the mouse
click

Re: How would I make a radial menu in live code?

Posted: Tue Aug 02, 2011 9:37 pm
by wolfkillshepard
That's for those commands but I am having trouble implementing them, could you give me a sample script?

Re: How would I make a radial menu in live code?

Posted: Tue Aug 02, 2011 11:27 pm
by dunbarx
Do you mean a sort of "pie" chart, where individual slices of the pie might be separate objects? And when you say "hold your finger", do you mean "move the mouse", whether or not the mouse is down?

If yes to any of these, then perhaps you might experiment with polygons and circles. These can be drawn to make your pie chart, and are really used here like buttons, in that they can respond to some of the standard messages that Bjoernke suggested.

Play with this idea. Write back for more details. If you can do what you want with a string of buttons, you should be able to construct your gadget.

Craig Newman

Re: How would I make a radial menu in live code?

Posted: Tue Aug 02, 2011 11:45 pm
by Dixie
Hi...

Very quickly a little stack.. have a look in the application browser to see how the objects are positioned... the scripts are in the objects p1 through p4

hope it helps

Dixie

Re: How would I make a radial menu in live code?

Posted: Wed Aug 03, 2011 12:17 am
by Kaubs
I have linked a video which states the kind of menu he is talking about. Thanks for the example dixie but the issue with that in iOS is that it only recognizes clicks over one quadrant. The IOS is hard because we would really like to see a fluid motion and then select the object upon touchrelease.

this is the radial style he is trying for.
http://www.youtube.com/watch?v=z0vGqZ66n54

I have no idea as to how making that work would look.

Re: How would I make a radial menu in live code?

Posted: Wed Aug 03, 2011 4:47 am
by Regulae
Hi there,

You could try the attached stack. I haven't tried to make it look like the example- the key at the moment is finding out whether the script will give you the sort of performance you want in iOS. Refinements can be made later. The five fields are in a group- the script is in the group, so "untick" select grouped controls under LiveCodes "Edit" menu to select the group.

Regards,

Michael

Re: How would I make a radial menu in live code?

Posted: Thu Aug 04, 2011 6:20 pm
by wolfkillshepard
Thanks a lot I manged to get what I wanted with it.

Re: How would I make a radial menu in live code?

Posted: Sat Aug 06, 2011 7:59 am
by Regulae
Hi there,

It's good to hear you've got something working. The particular challenge is having the menu segments highlight as the mouse/finger enters them, during the "mouse is down" state. mouseEnter/Leave messages aren't sent, but mouseMoves, with the parameters newMouseH, newMouseV, are. The previous stack detected movement into the menu segments by using those parameters. More complex menus can be hard to define this way, the "<" and ">" conditions become elaborate. The attached stack uses a different method which detects regions without having to define them in the mouseMove handler, in case anyone's interested.

Regards,

Michael