From AGI Wiki
Jump to: navigation, search

The command adds a menu to the menu system.

Syntax mA);"menu text");


In AGI menus are the displayed along the top of the menu bar, and each menu may have zero or more menu items, which are the drop-down list of items to choose from. The command adds new menu mA to the menu structure. Menus will be displayed on the menu bar in the order that they are added with the command. A single space is added between each menu.

The items that will be in the drop down list for the menu must be added in order immediately after the menu is is created. The order of menus and menu items cannot be changed once they are created.

Care should be taken to ensure all the menus added will fit on the menu bar. A single space is added between menu entries, so for the menus to fit, the total number of characters in all menus plus the number of menus should not exceed 40.

Unlike menu items, menus are not selectable, i.e. they cannot be assigned to controllers. One or more commands should follow the command. Menus with no items added will be disabled automatically by AGI and cannot be selected.

Calls to after the menu system is added (by calling the command) are ignored.

Possible Errors

Do not include a line break in a menu; the extra lines will display on the line below the menu, and will not automatically erase, unless covered up by another menu selection.


[ build a simple menu system"Info");"About   ", c0);"Help    ", c1);
''''''("File");"Save Game      <F5>", c2);"Restore Game   <F7>", c3);"-------------------", c20);"Restart Game   <F9>", c4);"-------------------", c20);"Quit        <Alt Z>", c5);
[ disable the separators
[ submit menu to agi

Technical Information

Required Interpreter Version: Available in version 2.272 and above.
Byte-Code Value: 156 (0x9C hex)

See Also

Player Input Commands
Menus in AGI