Methods
(static) closeMenu()
Closes a menu.
(static) createMenu(name_prefix, x, y, options)
Creates and displays a menu.
If you want to refer to the menu block in CSS, use
._menu.
Parameters:
| Name | Type | Description |
|---|---|---|
name_prefix |
String | Prefix to use for the menu block class in CSS. |
x |
int | x-part of the upper-left corner position of a menu. |
y |
int | y-part of the upper-left corner position of a menu. |
options |
Array | Array of menu items of type
`[k, v]`, where `k` is the label of a menu item to be
displayed and `v` is of form `[ |
(static) createMenuWithCustomBlocks(name_prefix, x, y, blocks)
Creates and displays a menu with custom-made blocks.
If you want to refer to the menu block in CSS, use
._menu.
Parameters:
| Name | Type | Description |
|---|---|---|
name_prefix |
String | Prefix to use for the menu block class in CSS. |
x |
int | x-part of the upper-left corner position of a menu. |
y |
int | y-part of the upper-left corner position of a menu. |
blocks |
Array | Array of custom menu items of type
`{item: Hello World! ')`), ` |