Doc - gui - MenuOption


Class: MenuOption

Inherits from: UiElement

Window option bar dropdown menu element

Constructor

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.

Variables

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'

Instance Functions

Return Name Description
nil draw(window: Window) Override. Draws the menu
nil process(event: table, window: Window) Override. Processes mouse_click events