Earlier Versions
Name | Size | Uploaded | Game Version | Downloads | |
v4.19.10000047936 +1 More release | 28.67 KB | Feb 5, 2023 | 10.0.5 +3 | 629 | ![]() |
v4.18.10000046801 +1 More release | 28.64 KB | Nov 29, 2022 | 10.0.2 +3 | 1,184 | ![]() |
v4.17.10000046801 +1 More release | 28.65 KB | Nov 29, 2022 | 10.0.2 +3 | 80 | ![]() |
v4.16.10000046689 +1 More release | 28.53 KB | Nov 17, 2022 | 10.0.2 +3 | 595 | ![]() |
v4.14.10000046455 +1 More release | 28.46 KB | Nov 4, 2022 | 10.0.0 +3 | 558 | ![]() |
v4.13.10000046366 +1 More release | 28.43 KB | Nov 3, 2022 | 10.0.0 +3 | 206 | ![]() |
v4.12.9020745161 +1 More release | 27.25 KB | Aug 22, 2022 | 9.2.7 +3 | 876 | ![]() |
v4.11.9020745114 +1 More release | 27.22 KB | Aug 17, 2022 | 9.2.7 +2 | 303 | ![]() |
v4.10.9020542423 +1 More release | 26.79 KB | Jul 17, 2022 | 9.2.5 +2 | 494 | ![]() |
v4.09.9020042698 +1 More release | 26.51 KB | Mar 23, 2022 | 2.5.4 +2 | 686 | ![]() |
v4.09.9020042488 +1 More release | 26.50 KB | Feb 27, 2022 | 9.2.0 +2 | 407 | ![]() |
v4.08.9020042423 +1 More release | 26.44 KB | Feb 23, 2022 | 9.2.0 +2 | 271 | ![]() |
v4.07.9020042277 +1 More release | 26.43 KB | Feb 13, 2022 | 1.14.2 +2 | 377 | ![]() |
v4.07.9020042257 +1 More release | 26.11 KB | Feb 11, 2022 | 1.14.2 +2 | 175 | ![]() |
v4.07.9020042174 +1 More release | 26.08 KB | Feb 9, 2022 | 2.5.3 +2 | 197 | ![]() |
v4.07.9020042069 +1 More release | 25.26 KB | Jan 26, 2022 | 9.1.5 | 284 | ![]() |
v4.06.9010039185 +1 More release | 25.11 KB | Jun 30, 2021 | 9.1.0 | 950 | ![]() |
v4.05.9000538556 +1 More release | 29.44 KB | Jun 14, 2021 | 9.0.5 | 423 | ![]() |
v4.04.9000538556 +1 More release | 29.17 KB | Jun 14, 2021 | 9.0.5 | 79 | ![]() |
v4.03.9000538556 +1 More release | 28.90 KB | May 18, 2021 | 9.0.5 | 564 | ![]() |
v4.02.9000538556 +1 More release | 28.79 KB | May 18, 2021 | 9.0.5 | 35 | ![]() |
v4.00.9000236639 +1 More release | 28.70 KB | Nov 22, 2020 | 9.0.2 | 862 | ![]() |
v3.02.9000136272.01 +1 More release | 26.30 KB | Oct 20, 2020 | 9.0.1 | 623 | ![]() |
v3.02.9000136272 +1 More release | 26.18 KB | Oct 18, 2020 | 9.0.1 | 351 | ![]() |
v3.01.9000135522 +1 More release | 26.19 KB | Sep 7, 2020 | 8.3.0 | 586 | ![]() |
v3.00.9000135522 +1 More release | 26.17 KB | Aug 18, 2020 | 8.3.0 | 372 | ![]() |
v2.01.8020031429 +1 More release | 25.42 KB | Sep 2, 2019 | 8.2.0 | 1,057 | ![]() |
v2.00.8010028833 +1 More release | 25.40 KB | Dec 26, 2018 | 8.1.0 | 1,318 | ![]() |
v1.08.8010028768 +1 More release | 23.01 KB | Dec 17, 2018 | 8.1.0 | 605 | ![]() |
v1.08.80001273226 +1 More release | 23.16 KB | Aug 11, 2018 | 8.0.1 | 1,320 | ![]() |
v1.08.8000127165 +1 More release | 23.05 KB | Jul 25, 2018 | 8.0.1 | 1,054 | ![]() |
v1.08.8000126433 +1 More release | 22.63 KB | Apr 24, 2018 | 7.3.5 | 650 | ![]() |
v1.07.7030525961 +1 More release | 19.36 KB | Apr 23, 2018 | 7.3.5 | 224 | ![]() |
v1.07.7030024931 +1 More release | 19.27 KB | Aug 31, 2017 | 7.3.0 | 1,436 | ![]() |
v1.06.7030024931 +1 More release | 19.29 KB | Aug 31, 2017 | 7.3.0 | 170 | ![]() |
v1.05.7030024920 +1 More release | 19.29 KB | Aug 29, 2017 | 7.3.0 | 243 | ![]() |
v1.04.7030024484 +1 More release | 19.26 KB | Jul 2, 2017 | 7.2.5 | 304 | ![]() |
v1.03.7030024484 +1 More release | 19.21 KB | Jun 30, 2017 | 7.2.5 | 189 | ![]() |
v1.02.7030024484 +1 More release | 19.19 KB | Jun 30, 2017 | 7.2.5 | 152 | ![]() |
v1.01.7020024015 +1 More release | 19.02 KB | May 25, 2017 | 7.2.0 | 248 | ![]() |
v1.00.7020024015 +1 More release | 18.97 KB | May 24, 2017 | 7.2.0 | 189 | ![]() |
r119-alpha +1 More alpha | 28.62 KB | Feb 5, 2023 | 10.0.5 +3 | 7 | ![]() |
r117-alpha +1 More alpha | 28.60 KB | Nov 29, 2022 | 10.0.2 +3 | 24 | ![]() |
r115-alpha +1 More alpha | 28.61 KB | Nov 29, 2022 | 10.0.2 +3 | 9 | ![]() |
r113-alpha +1 More alpha | 28.49 KB | Nov 17, 2022 | 10.0.2 +3 | 13 | ![]() |
r111-alpha +1 More alpha | 28.47 KB | Nov 17, 2022 | 10.0.2 +3 | 8 | ![]() |
r109-alpha +1 More alpha | 28.42 KB | Nov 4, 2022 | 10.0.0 +3 | 11 | ![]() |
r107-alpha +1 More alpha | 28.39 KB | Nov 3, 2022 | 10.0.0 +3 | 9 | ![]() |
r106-alpha +1 More alpha | 28.39 KB | Nov 3, 2022 | 10.0.0 +3 | 9 | ![]() |
r104-alpha +1 More alpha | 27.20 KB | Aug 22, 2022 | 9.2.7 | 30 | ![]() |
r102-alpha +1 More alpha | 27.18 KB | Aug 17, 2022 | 9.2.7 | 44 | ![]() |
r100-alpha +1 More alpha | 26.76 KB | Jul 17, 2022 | 9.2.5 | 72 | ![]() |
r98-alpha +1 More alpha | 26.48 KB | Mar 23, 2022 | 9.2.0 | 37 | ![]() |
r96-alpha +1 More alpha | 26.47 KB | Feb 27, 2022 | 9.2.0 | 40 | ![]() |
r94-alpha +1 More alpha | 26.41 KB | Feb 23, 2022 | 9.2.0 | 79 | ![]() |
r93-alpha +1 More alpha | 26.41 KB | Feb 23, 2022 | 9.2.0 | 76 | ![]() |
r91-alpha +1 More alpha | 26.40 KB | Feb 13, 2022 | 9.1.5 | 96 | ![]() |
r89-alpha +1 More alpha | 26.08 KB | Feb 11, 2022 | 9.1.5 | 47 | ![]() |
r87-alpha +1 More alpha | 26.04 KB | Feb 8, 2022 | 9.1.5 | 342 | ![]() |
r84-alpha +1 More alpha | 25.25 KB | Jan 26, 2022 | 9.1.5 | 76 | ![]() |
r82-alpha +1 More alpha | 25.10 KB | Jun 30, 2021 | 9.1.0 | 128 | ![]() |
r81-alpha +1 More alpha | 25.10 KB | Jun 30, 2021 | 9.1.0 | 53 | ![]() |
r80-alpha +1 More alpha | 25.10 KB | Jun 30, 2021 | 9.1.0 | 73 | ![]() |
r78-alpha +1 More alpha | 29.43 KB | Jun 14, 2021 | 9.0.5 | 56 | ![]() |
r76-alpha +1 More alpha | 29.16 KB | Jun 14, 2021 | 9.0.5 | 45 | ![]() |
r75-alpha +1 More alpha | 28.96 KB | May 19, 2021 | 9.0.5 | 91 | ![]() |
r73-alpha +1 More alpha | 28.89 KB | May 18, 2021 | 9.0.5 | 26 | ![]() |
r71-alpha +1 More alpha | 28.79 KB | May 18, 2021 | 9.0.5 | 38 | ![]() |
r70-alpha +1 More alpha | 28.78 KB | May 18, 2021 | 9.0.2 | 46 | ![]() |
r66-alpha +1 More alpha | 28.69 KB | Nov 22, 2020 | 9.0.2 | 93 | ![]() |
r65-alpha +1 More alpha | 28.69 KB | Nov 18, 2020 | 9.0.1 | 84 | ![]() |
r64-alpha +1 More alpha | 28.60 KB | Nov 18, 2020 | 9.0.1 | 61 | ![]() |
r57-alpha +1 More alpha | 26.29 KB | Oct 20, 2020 | 9.0.1 | 45 | ![]() |
r55-alpha +1 More alpha | 26.17 KB | Oct 18, 2020 | 9.0.1 | 38 | ![]() |
r53-alpha +1 More alpha | 26.18 KB | Sep 7, 2020 | 8.3.0 | 139 | ![]() |
r49-alpha +1 More alpha | 26.16 KB | Aug 18, 2020 | 8.3.0 | 72 | ![]() |
r43-alpha +1 More alpha | 25.41 KB | Sep 2, 2019 | 8.2.0 | 131 | ![]() |
r41-alpha +1 More alpha | 25.39 KB | Dec 26, 2018 | 8.1.0 | 168 | ![]() |
r40-alpha +1 More alpha | 25.39 KB | Dec 23, 2018 | 8.1.0 | 174 | ![]() |
r38-alpha +1 More alpha | 23.00 KB | Dec 17, 2018 | 8.1.0 | 150 | ![]() |
r36-alpha +1 More alpha | 23.15 KB | Aug 11, 2018 | 8.0.1 | 161 | ![]() |
r34-alpha +1 More alpha | 23.04 KB | Jul 25, 2018 | 8.0.1 | 141 | ![]() |
r32-alpha +1 More alpha | 22.61 KB | Apr 24, 2018 | 7.3.5 | 163 | ![]() |
r31-alpha +1 More alpha | 22.62 KB | Apr 24, 2018 | 7.3.5 | 145 | ![]() |
r30-alpha +1 More alpha | 22.62 KB | Apr 24, 2018 | 7.3.5 | 172 | ![]() |
r29-alpha +1 More alpha | 22.48 KB | Apr 23, 2018 | 7.3.5 | 216 | ![]() |
r27-alpha +1 More alpha | 19.35 KB | Apr 23, 2018 | 7.3.5 | 176 | ![]() |
r25-alpha +1 More alpha | 19.26 KB | Aug 31, 2017 | 7.3.0 | 194 | ![]() |
r23-alpha +1 More alpha | 19.28 KB | Aug 31, 2017 | 7.3.0 | 162 | ![]() |
r21-alpha +1 More alpha | 19.28 KB | Aug 29, 2017 | 7.3.0 | 197 | ![]() |
r19-alpha +1 More alpha | 19.25 KB | Jul 2, 2017 | 7.2.5 | 170 | ![]() |
r17-alpha +1 More alpha | 19.20 KB | Jun 30, 2017 | 7.2.5 | 119 | ![]() |
r15-alpha +1 More alpha | 19.18 KB | Jun 30, 2017 | 7.2.5 | 115 | ![]() |
r13-alpha +1 More alpha | 19.01 KB | May 25, 2017 | 7.2.0 | 116 | ![]() |
r11-alpha +1 More alpha | 18.96 KB | May 24, 2017 | 7.2.0 | 123 | ![]() |
r8-alpha +1 More alpha | 18.94 KB | May 24, 2017 | 7.2.0 | 132 | ![]() |
r7-alpha +1 More alpha | 18.94 KB | May 24, 2017 | 7.2.0 | 96 | ![]() |
Description
About
Standard UIDropDownMenu‘s global functions using protected frames and causing taints when used by third-party addons. But it is possible to avoid taints by using same functionality with that library.
What is it
Library is standard code from Blizzard’s files EasyMenu.lua, UIDropDownMenu.lua, UIDropDownMenu.xml, UIDropDownMenuTemplates.lua and UIDropDownMenuTemplates.xml with frames, tables, variables and functions bounded to the library tables.
Global constants have been added with a prefix “L_“, for example:
- L_UIDROPDOWNMENU_MINBUTTONS
Addon Dependancy and Configuration
- Embed LibUIDropDownMenu to your addon, you can specify to the subfolder of LibUIDropDownMenu if you feel this keep your addon’s folder structure lighter.
- Add LibUIDropDownMenu.xml to your toc or your embeds.xml / libs.xml.
- Make sure your toc file has the following settings:
## Dependencies: LibStub, !LibUIDropDownMenu
- If your addon doesn’t embed LibStub, you will need it.
How to use it (for addon developer)
Initial Preparation
Assuming your addon is using all the UIDropDownMenu functions from the WoW’s built in function calls, then it is suggested that you have below preparation in your lua codes:
local LibDD = LibStub:GetLibrary(“LibUIDropDownMenu-4.0“)
Function Call Replacement
Depends on which UIDropDownMenu’s function calls you have used in your addon, you will need below similar replacement:
UIDropDownMenu_Initialize => LibDD:UIDropDownMenu_Initialize
UIDropDownMenu_CreateInfo => LibDD:UIDropDownMenu_CreateInfo
UIDropDownMenu_AddButton => LibDD:UIDropDownMenu_AddButtonUIDropDownMenu_AddSeparator => LibDD:UIDropDownMenu_AddSeparator
UIDropDownMenu_AddSpace=> LibDD:UIDropDownMenu_AddSpaceUIDropDownMenu_SetSelectedValue => LibDD:UIDropDownMenu_SetSelectedValue
UIDropDownMenu_SetSelectedName=> LibDD:UIDropDownMenu_SetSelectedNameUIDropDownMenu_SetSelectedID => LibDD:UIDropDownMenu_SetSelectedID
UIDropDownMenu_SetWidth => LibDD:UIDropDownMenu_SetWidthCloseDropDownMenus => LibDD:CloseDropDownMenus
Creating new UIDropDownMenu
Traditionally you will either create a new frame in your lua codes or with XML by setting the frame to inherit from “UIDropDownMenuTemplate“.
For example, if your lua code was something like below in the past:
local frame = CreateFrame(“Frame”, addon.Name..”DropDown”, nil, “UIDropDownMenuTemplate“)
By using this library, you will need to create your menu from like below:
local frame = LibDD:Create_UIDropDownMenu(“MyDropDownMenu“, parent_frame)
Constants
L_UIDROPDOWNMENU_MINBUTTONS- L_UIDROPDOWNMENU_MAXBUTTONS
- L_UIDROPDOWNMENU_MAXLEVELS
- L_UIDROPDOWNMENU_BUTTON_HEIGHT
- L_UIDROPDOWNMENU_BORDER_HEIGHT
- L_UIDROPDOWNMENU_OPEN_MENU
- L_UIDROPDOWNMENU_INIT_MENU
- L_UIDROPDOWNMENU_MENU_LEVEL
- L_UIDROPDOWNMENU_MENU_VALUE
- L_UIDROPDOWNMENU_SHOW_TIME
- L_UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT
- L_OPEN_DROPDOWNMENUS
- L_DropDownList1
- L_DropDownList2
Button Name
As you (the developers) might be aware that at some point you might need to manipulate the dropdowns by accessing the button names. For example, you have multiple levels of menus and you would like to hide or show some level’s menu button. In that case, you need to make sure you also revise the button name used in your original codes when you are migrating to use LibUIDropDownMenu.
- “L_DropDownList”..i
Example:
for i = 1, L_UIDROPDOWNMENU_MAXLEVELS, 1 do dropDownList = _G["L_DropDownList"..i]; if ( i >= L_UIDROPDOWNMENU_MENU_LEVEL or frame ~= L_UIDROPDOWNMENU_OPEN_MENU ) then dropDownList.numButtons = 0; dropDownList.maxWidth = 0; for j=1, L_UIDROPDOWNMENU_MAXBUTTONS, 1 do button = _G["L_DropDownList"..i.."Button"..j]; button:Hide(); end dropDownList:Hide(); end end
List of button attributes
- info.text = [STRING] — The text of the button
- info.value = [ANYTHING] — The value that L_UIDROPDOWNMENU_MENU_VALUE is set to when the button is clicked
- info.func = [function()] — The function that is called when you click the button
- info.checked = [nil, true, function] — Check the button if true or function returns true
- info.isNotRadio = [nil, true] — Check the button uses radial image if false check box image if true
- info.isTitle = [nil, true] — If it’s a title the button is disabled and the font color is set to yellow
- info.disabled = [nil, true] — Disable the button and show an invisible button that still traps the mouseover event so menu doesn’t time out
- info.tooltipWhileDisabled = [nil, 1] — Show the tooltip, even when the button is disabled.
- info.hasArrow = [nil, true] — Show the expand arrow for multilevel menus
- info.hasColorSwatch = [nil, true] — Show color swatch or not, for color selection
- info.r = [1 – 255] — Red color value of the color swatch
- info.g = [1 – 255] — Green color value of the color swatch
- info.b = [1 – 255] — Blue color value of the color swatch
- info.colorCode = [STRING] — “|cAARRGGBB” embedded hex value of the button text color. Only used when button is enabled
- info.swatchFunc = [function()] — Function called by the color picker on color change
- info.hasOpacity = [nil, 1] — Show the opacity slider on the colorpicker frame
- info.opacity = [0.0 – 1.0] — Percentatge of the opacity, 1.0 is fully shown, 0 is transparent
- info.opacityFunc = [function()] — Function called by the opacity slider when you change its value
- info.cancelFunc = [function(previousValues)] — Function called by the colorpicker when you click the cancel button (it takes the previous values as its argument)
- info.notClickable = [nil, 1] — Disable the button and color the font white
- info.notCheckable = [nil, 1] — Shrink the size of the buttons and don’t display a check box
- info.owner = [Frame] — Dropdown frame that “owns” the current dropdownlist
- info.keepShownOnClick = [nil, 1] — Don’t hide the dropdownlist after a button is clicked
- info.tooltipTitle = [nil, STRING] — Title of the tooltip shown on mouseover
- info.tooltipText = [nil, STRING] — Text of the tooltip shown on mouseover
- info.tooltipOnButton = [nil, 1] — Show the tooltip attached to the button instead of as a Newbie tooltip.
- info.justifyH = [nil, “CENTER”] — Justify button text
- info.arg1 = [ANYTHING] — This is the first argument used by info.func
- info.arg2 = [ANYTHING] — This is the second argument used by info.func
- info.fontObject = [FONT] — font object replacement for Normal and Highlight
- info.menuTable = [TABLE] — This contains an array of info tables to be displayed as a child menu
- info.noClickSound = [nil, 1] — Set to 1 to suppress the sound when clicking the button. The sound only plays if .func is set.
- info.padding = [nil, NUMBER] — Number of pixels to pad the text on the right side
- info.leftPadding = [nil, NUMBER] — Number of pixels to pad the button on the left side
- info.minWidth = [nil, NUMBER] — Minimum width for this line
- info.customFrame = frame — Allows this button to be a completely custom frame, should inherit from UIDropDownCustomMenuEntryTemplate and override appropriate methods.
- info.icon = [TEXTURE] — An icon for the button.
- info.mouseOverIcon = [TEXTURE] — An override icon when a button is moused over.
- info.ignoreAsMenuSelection [nil, true] — Never set the menu text/icon to this, even when this button is checked.
FAQ
Please go to FAQ Pages for more details.
Add a comment