How would I make a radial menu in live code?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 44
- Joined: Tue Jul 12, 2011 7:43 pm
How would I make a radial menu in live code?
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
-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?
mouseDown
mouseUp
mouseRelease
mouseWithin
mouseMove
the target
the mouseControl
the mouse
click
mouseUp
mouseRelease
mouseWithin
mouseMove
the target
the mouseControl
the mouse
click
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- Posts: 44
- Joined: Tue Jul 12, 2011 7:43 pm
Re: How would I make a radial menu in live code?
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?
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
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?
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
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
- Attachments
-
- simplePie.livecode.zip
- (1.42 KiB) Downloaded 310 times
Re: How would I make a radial menu in live code?
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.
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?
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
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
- Attachments
-
- radial test.zip
- (1.01 KiB) Downloaded 336 times
-
- Posts: 44
- Joined: Tue Jul 12, 2011 7:43 pm
Re: How would I make a radial menu in live code?
Thanks a lot I manged to get what I wanted with it.
Re: How would I make a radial menu in live code?
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
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
- Attachments
-
- radialmenu.zip
- (4.82 KiB) Downloaded 335 times