menu

Module(s): vncanvas-base, vncanvas-script, canvastext
Description: Displays a list of selectable choices in script box.

  • Menu settings, such as highlight color, may be set in configuration file.

menu, [array_of_text]
Display a list of choices in script box that can be selected like a menu.
The array is arranged as follows:
- First entry is a prompt string. Can be "" to display empty line.
- Subsequent 2 entries are choice-label menuitem pair, where label is the script position to jump to.
Currently, only single line menuitems are supported.

Also supports choice-uservar menuitem pair, where uservar is a user variable to set. After the selection, execution proceeds to the following script line.
For the menu below, when first is chosen, game continues at label1; when the second is chosen, game continues at label2. For the third choice, a variable named var is set to true.
  
chapter = [

	...
	menu, ["Please select:",
		"This is menuitem1", "label1",
		"This is menuitem2", "label2",
		"This is menuitem3", {var:true},
		"This is menuitem4", "chapter2#label1" ],
	...
];