Button - sirinsidiator/ESO-LibAddonMenu GitHub Wiki

Data Table

property type default required description
type string - yes The widget type of this control ("button")
name string - yes "My Button", string id or function returning a string
func function - yes function() end,
tooltip number, string, function nil no "Button's tooltip text.", string id or function returning a string
width string "full" no "full" or "half" width in the panel
disabled boolean, function false no Determines if the button is disabled and its value cannot be changed
icon string, function - no "icon\path.dds", or function returning a string
isDangerous boolean false no If set to true, the button text will be red and a confirmation dialog with the button label and warning text will show on click before the callback is executed
warning number, string, function nil no Shows a warning icon beside the button which has a tooltip with some warning text
helpUrl string, function - no A string URL "https://www.esoui.com", or a function that returns one
reference string nil no A unique global reference to the control

Examples

{
  type = "button",
  name = "My Button",
  tooltip = "Button's tooltip text.",
  func = function() d("button pressed!") end,
  width = "half",	--or "full" (optional)
  warning = "Will need to reload the UI.",	--(optional)
},