MenuOption
UiElement
Window option bar dropdown menu element
pos.gui.MenuOption(x: number, name: string, options: table, w: number, onSelect: function)
Creates a new MenuOption at the given location with options and dropdown width.
Type | Name | Description |
---|---|---|
number |
w |
Dropdown width |
string |
name |
Menu name |
table |
options |
List of options |
boolean |
visible |
If the dropdown is visible |
function |
onSelect |
On option select callback |
string |
type |
Override. type is 'MenuOption' |
Return | Name | Description |
---|---|---|
nil |
draw(window: Window) |
Override. Draws the menu |
nil |
process(event: table, window: Window) |
Override. Processes mouse_click events |