Thread: LAM 1.0 syntax?
View Single Post
06/16/14, 09:31 AM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Lua Code:
  1. LAM         = LibStub("LibAddonMenu-1.0")
  2. panelID     = LAM:CreateControlPanel(controlPanelID, controlPanelName)  --required
  3. header      = LAM:AddHeader(panelID, controlName, text)                 --each panel must have at last one header
  4. slider      = LAM:AddSlider(panelID, controlName, text, tooltip, minValue, maxValue, step, getFunc, setFunc, warning, warningText)
  5. dropdown    = LAM:AddDropdown(panelID, controlName, text, tooltip, validChoices, getFunc, setFunc, warning, warningText)
  6. checkbox    = LAM:AddCheckbox(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
  7. colorpicker = LAM:AddColorPicker(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
  8. editbox     = LAM:AddEditBox(panelID, controlName, text, tooltip, isMultiLine, getFunc, setFunc, warning, warningText)
  9. button      = LAM:AddButton(panelID, controlName, text, tooltip, onClick, warning, warningText)
  10. description = LAM:AddDescription(panelID, controlName, text, titleText)
  11. submenu     = LAM:AddSubMenu(panelID, controlName, text, tooltip)
  12.  
  13. --return value panelID is an index (number) stored in _G[controlPanelID]
  14. --return value from all other functions is the control itself
  15. --argument panelID is either panelID (type "number") or submenu (type "userdata")
  16. --all warnings are optional and can be omitted
  Reply With Quote