Go to Page... |
Compatibility: | Shadowlands patch (9.0.2) Shadowlands pre-patch (9.0.1) Visions of N'Zoth (8.3.0) |
Updated: | 12-06-20 06:05 PM |
Created: | 11-13-10 09:51 AM |
Downloads: | 2,348 |
Favorites: | 4 |
MD5: |
An alternative to using Blizzard's UIDropDownMenuTemplate and EasyMenu.
Example usage:
local menu = LibStub('LibMenuAssist-1.0'):New() menu:SetAnchor(0, 0, 'TOP', myAddon.button, 'BOTTOM') menu.initialize = function(self, level) -- Do stuff end myAddon.button:SetScript('OnClick', function() menu:Open() end)
local menu = LibStub('LibMenuAssist-1.0'):New() menu:SetAnchor(0, 0, 'TOP', myAddon.button, 'BOTTOM') menu[0] = function(self, level) -- Called first each time menu.initialize is called end menu[1] = function(self, level) -- Called when menu.initialize is called and level == 1 (*) end menu[2] = function(self, level) -- Called when menu.initialize is called and level == 2 (*) end myAddon.button:SetScript('OnClick', function() menu:Open() end)
menu - (table) The menu object to be used by the calling code (see Menu Objects below).
frame - (table) The frame to be added.
wasOpen - (boolean or nil) True if the menu was open, nil otherwise.
hasFocus - (boolean or nil) True if the mouse focus is part of the menu, nil otherwise.
isOpen - (boolean or nil) True if the menu is open, nil otherwise.
... - Optional values leading to sub-menu levels.Returns:
level - (number or nil) The highest menu level that is open, nil otherwise.
level - (number or nil) The highest menu level that is open, nil otherwise.
frame - (table) The frame to be removed.
xOffset - (number or nil) The new value for menu.xOffset.Returns:
yOffset - (number or nil) The new value for menu.yOffset.
point - (string or nil) The new value for menu.point.
relativeTo - (string, table, or nil) The new value for menu.relativeTo.
relativePoint - (string or nil) The new value for menu.relativePoint.
updated - (boolean or nil) True if the menu was updated, nil otherwise.
isOpen - (boolean or nil) True if the menu is open, nil otherwise.
Comment Options |
10-01-12, 09:42 PM | |
|
Favorite so I can check it out soon
|
|
Dridzt |
View Public Profile |
Send a private message to Dridzt |
Find More Posts by Dridzt |
Add Dridzt to Your Buddy List |