I'm now using your lib. Thanks again.
Feedback:
Don't know if you care, but if you provide a "name" arg I would expect that it is used.
Code:
function lib:New(parent, name, tooltipText, items, keepShownOnClick, pOnClickFunc)
<...>
local dropdown = CreateFrame("Frame", name, parent)
instead of
Code:
function lib:New(parent, name, tooltipText, items, keepShownOnClick, pOnClickFunc)
<...>
local dropdown = CreateFrame("Frame", nil, parent)
[e]
I would consider a dropdown list that closes if the mouse is leaving it as more useful:
Lua Code:
local list = CreateFrame("Button", "PhanxConfigScrollingDropdown" .. id, dropdown)
list:SetScript("OnLeave", function(self)
if (GetMouseFocus():GetParent():GetName() ~= self:GetName()) == true then
CloseDropDownMenus()
end
end)
Oh, and disabled list buttons are still clickable. But I guess this is intentionally, right?
Originally Posted by Phanx
https://github.com/Phanx/PhanxConfig...ngDropdown.lua
It even scrolls long lists, and unlike Ace3 scrolling dropdowns, auto-scrolls the selected entry into view. Feel free to use it as a base, or just use it, though it's not officially "released" so I'd recommend renaming yours so my arbitrary API changes don't break your addon.
|