Report as inappropriate.
A simple to use menu and button class demo. Create a menu object by sending it an array of strings for the text to display on each button object. A second constructor allows also sending a flag to indicate cancel option open or closed. Multiple methods are provided to alter the appearance of the buttons, as well as changing their active state. The Button class that the Menu class uses can be used by itself to create stand-alone buttons objects or text objects; however, if you use the Menu class in a scenario, you must also have the Button class in it.
Clicking on an active title button object will cancel the menu (remove it, without a selection being made)
The string array contains the title text first, and the option text after.
Options appear confortably on screen if given 25 pixels per option, height-wise.
Active buttons enlarge and brighten when mouse hovers over them.
The latest update includes adding two more sub-classes for the Button class: a 'BlinkText' sub-class (for text that alternates colors) and a 'Marquiss' class which allows the text to scroll across the button. Click on a title button (like 'MENU 0') for examples.