View Single Post
11/18/14, 06:15 PM   #8
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Check how it is done in HarvestMap addon.
Lua Code:
  1. local optionsTable = setmetatable({}, { __index = table })
  2.  
  3. optionsTable:insert({
  4.     type = "button",
  5.     name = "Import other Accounts",
  6.     tooltip = "Moves gathered data from other Accounts to this one. This can also restore lost data after an ESO update.",
  7.     warning = "Please create a backup of your data first! Copy the file SavedVariables/HarvestMap.lua to somwhere else.",
  8.     width = "half",
  9.     func = function()
  10.         Harvest.makeGlobal("nodes")
  11.     end
  12. })
  13. --lots of other entries
  14.  
  15. --entries added by for loop
  16. for profession = 1, 8 do
  17.     optionsTable:insert({
  18.         type = "header",
  19.         name = Harvest.localization[ "filter"..profession ] .. " pin Options",
  20.     })
  21.     CreateFilter( profession )
  22.     CreateImportFilter( profession )
  23.     CreateGatherFilter( profession )
  24.     CreateSizeSlider( profession )
  25.     CreateColorPicker( profession )
  26. end
  27.  
  28. --rest of the entries
  Reply With Quote