SleepyDevelopersTeam / fantastic-umbrella

1 stars 0 forks source link

Create a control for dropdown button #5

Open BobNobrain opened 7 years ago

BobNobrain commented 7 years ago

A dropdown button should behave like a regular button when tapped, but acts differently on long taps. This button should be also toggleable. A dropdown button has an internal state, saying what action it performs. When pressed for a while, a dropdown button should display a special dropdown menu with some alternatives. This alternatives should be chosen by dragging the finger onto the chosen option and then releasing it. If user releases the finger somewhere outside any alternative, no changes and actions should be performed, and the dropdown menu gets hidden. If user chooses one of alternatives, dropdown button changes its internal state to a value, corresponding to the chosen alternative. In this case, no onTap or other actions are performed.

This button will be used for selecting and applying one of available abilities or inventory items.

Alternatives list will be changed dynamically. Alternatives count may be assumed to be known at compile time (but be chaged inside Unity editor).

related to #3