-
Notifications
You must be signed in to change notification settings - Fork 24
Submenu
Sharlikran edited this page Nov 28, 2020
·
8 revisions
The submenu control offers a way to structure your settings by hiding parts of them in a folding sub panel. Initially it will only show the name and when clicked it will open and reveal all the controls that have been attached. Starting with LAMr22 you can also use nested submenus.

| property | type | required | description |
|---|---|---|---|
| type | string | yes | The widget type of this control ("submenu") |
| name | number, string, function | yes | The text to display for the submenu |
| controls | table | yes | This table contains all controls that are located in the submenu |
| icon | string, function | no | "path/to/my/icon.dds", or function returning a string |
| iconTextureCoords | table, function | no | {left, right, top, bottom}, or function returning a table |
| tooltip | string, function | no | The tooltip to display for the submenu |
| disabled | function , boolean | no | function() return db.someBooleanSetting end, or boolean |
| disabledLabel | function , boolean | no | function() return db.someBooleanSetting end, or boolean |
| helpUrl | string, function | no | A string URL "https://www.esoui.com", or a function that returns one |
| reference | string | no | A unique global reference to the control |
This method updates the name and tooltip of the submenu with changes to the data table.
LAM:RegisterOptionControls(panelName, {
{
type = "submenu",
name = "My Submenu",
tooltip = "My Submenu Tooltip",
controls = {sliderData, buttonData},
reference = "MyAddonSubmenu"
}
})local controls, submenuControls = {}, {}
controls[#controls + 1] = {
type = "submenu",
name = "My Other Submenu",
controls = submenuControls
}
submenuControls[#submenuControls + 1] = sliderData
submenuControls[#submenuControls + 1] = buttonData
LAM:RegisterOptionControls(panelName, controls)General
Home
Differences between v1.0 and v2.0
Getting started
LAM2 for the Experienced Author
Reference
Exposed Methods on LAM2
LAM2 callbacks
Details on LAM2 data tables
LAM2 control widgets
Resources
Addons using LAM2
External controls
DatePicker widget
OrderListBox widget
SoundSlider widget
DualListBox widget
MultiSelectDropdown widget