The DirectOptionMenu class models a popup menu with an arbitrary number of items. It is composed of the menu bar, the popup marker, and the popup menu itself. The popup menu appears when the menu is clicked on and disappears when the user clicks again; if the click was inside the popup, the selection changes. By default, the text on the menu changes to whatever item is currently selected. The attributes that affect the appearance of the menu bar don't apply to the popup. Make sure to specify the items option or it may crash.
Keyword | Definition | Value |
textMayChange | Whether the text on the menu changes with the selection | 0 or 1 |
initialitem | The index of the item that appears next to the cursor when the popup appears | Number |
items | List of items in the popup menu | [Strings] |
command | Function called when an item is selected (the item is passed in as a parameter) | Function |
commandButtons | Which mouse button must be clicked to open the popup | LMB, MMB, or RMB |
extraArgs | Extra arguments to the function specified in command | [Extra Arguments] |
highlightColor | Color of highlighted text | (R,G,B,A) |
rolloverSound | The sound made when the cursor rolls over the button | Sound File Path |
clickSound | The sound made when the cursor clicks on the button | Sound File Path |
popupMarkerBorder | Use width to change the size of the border around the popup marker | (Width,Height) |
|