PalmMenuExampleButtonHandlers Class
Extends MonoBehaviour
Example of a bespoke behavior created to react to a particular palm menu.
This controls the state of the object that responds to the menu, but also parts of the menu itself, specifically those which depend on the state of the controlled object (swappable icons, various text boxes, etc.).
Change the color of the controlled object to the next in the list of allowed colors, looping if the end of the list is reached.
void ToggleRotationEnabled ( )
Toggle whether or not rotation is enabled, and set the icon of the controlling button to display what will happen next time the button is pressed.
void CycleRotationDirection ( )
Change the rotation direction of the controlled object to the next in the list of allowed directions, looping if the end of the list is reached.
Set the icon of the controlling button to display what will happen next time the button is pressed.
void IncrementElevation ( bool up )
Change the target elevation of the controlled object in the requested direction, within the limits [0.2, 2].
Set the text to display the new target elevation.
void CycleShape ( bool cycleForward )
Change the shape of the controlled object to the next or previous in the list of allowed shapes, depending on the requested direction, looping beyond the bounds of the list.
Set the text to display the name of the current shape.