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.
13766 views / 32 in the last 7 days
8 votes | 0 in the last 7 days
This scenario is a member of: Demos by danpost, Support Classes by danpost
Want to leave a comment? You must first log in.
2012/8/10
2012/8/11
2012/8/11
2015/1/1
2015/1/1
2019/9/3