[Request] icon touch menu

Post your work in progress addons and get feedback

Post » Tue Nov 25, 2014 3:13 pm

When you put your finger on your phone in some games a menu of icons appears around it in a hexagonal or square pattern. You then slide your finger to the choice icon and it fires that choice and the menu vanishes. This happens for instance in "civilization" type games when you touch a unit and pick defend or repair or whatever.

It is logically equivalent to a drop down menu.

This plugin would accept a sprite for each choice and where they appear relative to an origin x,y usually a circular clockwise arrangment of choices. The plugin fires the choice with an "on choice" type function and the sprites vanish or fade.


thanks for your time.
B
34
S
8
G
3
Posts: 169
Reputation: 3,305

Post » Tue Nov 25, 2014 4:32 pm

You would do this in events rather than a plug. Plugs aren't really made to interact with each other.
Ideally I would use sin cos, and an angle stored in a variable, a circle rather than a hex or square grid.
That way you would only be limited by the size of the icon.
There is a limitation in touch, as there is no "drag" detection, but you can fake it with either a dummy object doing collisions, or possibly a variable, and compare the angle.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Tue Nov 25, 2014 7:26 pm

newt. Thankyou for your comments, but I don't think we are thinking of the same thing. The plugin user defines the location of each sprite. Since a sprite and touch are both plugins, I suppose this plugin does interact with them, but just about every plugin does.

I can see what you mean about dragging not being in touch, I suppoe you could detect which sprite the touch lifts off to pick the sprite of choice, perhaps with a collision detection box dummy object as you suggest.

This kind of menu selection is ubiquitous in the phone app game world, so all of us doing it in events might not be the most efficient way to go about it.

I appreciate your taking the time to comment.
B
34
S
8
G
3
Posts: 169
Reputation: 3,305


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests