View Single Post
05/08/17, 12:23 AM   #1
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
LAM Control setup (Iconpicker)

Hey, I ran into an issue that I don't understand. Here is the code:

Code:
	local	iconSelect = LAMCreateControl.iconpicker(parent, {
		type = "iconpicker",
		name = "",
		tooltip = "Select the aura's appearance.",
		choices = icons,
		choicesTooltips = icons,
		--sort = "name-up", --or "name-down", "numeric-up", "numeric-down" (optional) - if not provided, list will not be sorted
		getFunc = function() d(self) end,
		setFunc = AuraMastery.EditAuraIcon,
		maxColumns = 20,
		visibleRows = 10,
		iconSize = 40,
		reference = "AuraMasteryDisplayMenu_IconSelect"
	})
	
	iconSelect:SetWidth(160)
	iconSelect:ClearAnchors()
	iconSelect:SetAnchor(TOPLEFT, parent, TOPLEFT, 0, 4)
ESO shows an error for the first line: function expected instead of nil, but I don't get, why. The Iconpicker works btw. and this error is NOT! detected by zbug, I just ran into it because I accidently deactivated zbug.

And another question concerning LAM's iconpicker: Is there any way to preselect an icon from the list for the button? The path is saved insinde the saved variables.

Cheers,
Letho
  Reply With Quote