Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-04-14, 04:08 PM   #1
Tactica
Not Amused
 
Tactica's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 96
3rd dropdown tier

I admit I know nothing about dropdown functions. Would like to add a third tier to this code for All, Lookalike, and Recolor as a "check/tick" setting.
Code:
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.func = DropdownTier2;
			info.arg1 = module;
			UIDropDownMenu_AddButton(info,tier);
		end
	end
end
Not sure if you need more code to know whats going on...thanks in advance.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » 3rd dropdown tier


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off