Here is a pic of what I have so far:
Would like the arrow to allow me to select/tick/check if I want to view "All" or just "Recolor" or just "Lookalike" from the module data.
Code:
local function DropdownTier2(self)
module.active = self.value
mog:SetModule(self.arg1,"Sets - "..self.value);
CloseDropDownMenus();
end
local function DropdownTier3(self)
module.active = self.value
mog:SetModule(self.arg1,"Sub Sets - "..self.value);
CloseDropDownMenus();
end
function module.Dropdown(module,tier)
local info;
if tier == 1 then
info = UIDropDownMenu_CreateInfo();
info.text = module.label;
info.value = module;
info.colorCode = "\124cFF00FF00";
info.hasArrow = true;
info.keepShownOnClick = true;
info.notCheckable = true;
UIDropDownMenu_AddButton(info,tier);
elseif tier == 2 then
for k,v in ipairs(armor) do
info = UIDropDownMenu_CreateInfo();
info.text = v;
-- info.value = v; -- value equals text if omitted!
info.notCheckable = true;
info.hasArrow = true;
info.func = DropdownTier2;
info.arg1 = module;
UIDropDownMenu_AddButton(info,tier);
elseif tier == 3 then
for k,v in ipairs(armor) do
info = UIDropDownMenu_CreateInfo();
info.text = v;
-- info.value = v; -- value equals text if omitted!
info.notCheckable = false;
info.func = DropdownTier3;
info.arg1 = module; --Sets?
UIDropDownMenu_AddButton(info,tier);
end
end
end
Project can be found
here for reference!