@@ -324,7 +324,7 @@ local ldbdata = {
324
324
if message == " RightButton" then
325
325
tooltip :Hide ()
326
326
updateMenu ()
327
- EasyMenu (ldbDropDownMenu , ldbDropDownFrame , " cursor" , 0 , 0 , " MENU" )
327
+ Baggins : EasyMenu (ldbDropDownMenu , ldbDropDownFrame , " cursor" , 0 , 0 , " MENU" )
328
328
-- Baggins:OpenConfig()
329
329
else
330
330
Baggins :OnClick ()
2478
2478
return
2479
2479
end
2480
2480
makeMenu (bag , slot )
2481
- EasyMenu (menu , itemDropdownFrame , " cursor" , 0 , 0 , " MENU" )
2481
+ Baggins : EasyMenu (menu , itemDropdownFrame , " cursor" , 0 , 0 , " MENU" )
2482
2482
-- make sure we restore the original scroll-wheel behavior for the DropdownList2-Frame
2483
2483
-- when the item-dropdown is closed
2484
2484
Baggins :SecureHookScript (DropDownList1 , " OnHide" , function ()
2510
2510
return
2511
2511
end
2512
2512
makeMenu (bag , slot )
2513
- EasyMenu (menu , itemDropdownFrame , " cursor" , 0 , 0 , " MENU" )
2513
+ Baggins : EasyMenu (menu , itemDropdownFrame , " cursor" , 0 , 0 , " MENU" )
2514
2514
-- make sure we restore the original scroll-wheel behavior for the DropdownList2-Frame
2515
2515
-- when the item-dropdown is closed
2516
2516
Baggins :SecureHookScript (DropDownList1 , " OnHide" , function ()
@@ -3604,7 +3604,7 @@ function BagginsOnAddonCompartmentClick(_,button)
3604
3604
if button == " RightButton" then
3605
3605
-- tooltip:Hide()
3606
3606
updateMenu ()
3607
- EasyMenu (ldbDropDownMenu , ldbDropDownFrame , " cursor" , 0 , 0 , " MENU" )
3607
+ Baggins : EasyMenu (ldbDropDownMenu , ldbDropDownFrame , " cursor" , 0 , 0 , " MENU" )
3608
3608
-- Baggins:OpenConfig()
3609
3609
else
3610
3610
Baggins :OnClick ()
@@ -4331,3 +4331,20 @@ local function GetItemUpgradeLevel(itemLink)
4331
4331
end
4332
4332
4333
4333
end
4334
+
4335
+ local function EasyMenu_Initialize (frame , level , menuList )
4336
+ for index = 1 , # menuList do
4337
+ local value = menuList [index ]
4338
+ if value .text then value .index = index ; UIDropDownMenu_AddButton (value , level ) end
4339
+ end
4340
+ end
4341
+
4342
+ function Baggins :EasyMenu (menuList , menuFrame , anchor , x , y , displayMode , autoHideDelay )
4343
+ if Baggins :IsRetailWow () then
4344
+ if displayMode == ' MENU' then menuFrame .displayMode = displayMode end
4345
+ UIDropDownMenu_Initialize (menuFrame , EasyMenu_Initialize , displayMode , nil , menuList )
4346
+ ToggleDropDownMenu (1 , nil , menuFrame , anchor , x , y , menuList , nil , autoHideDelay )
4347
+ else
4348
+ EasyMenu (menuList , menuFrame , anchor , x , y , displayMode , autoHideDelay )
4349
+ end
4350
+ end
0 commit comments