@@ -113,7 +113,7 @@ RE.BlinkPOIValue = 0.3
113113RE .BlinkPOIUp = true
114114
115115RE .FoundNewVersion = false
116- RE .AddonVersionCheck = 21003
116+ RE .AddonVersionCheck = 21004
117117RE .ScreenHeight , RE .ScreenWidth = UIParent :GetCenter ()
118118
119119RE .MapSettings = {
@@ -239,27 +239,6 @@ RE.BackdropC = {
239239 insets = { left = 5 , right = 5 , top = 5 , bottom = 5 },
240240}
241241
242- RE .POIDropDown = {
243- { text = L [" Incoming" ], hasArrow = true , notCheckable = true ,
244- menuList = {
245- { text = " 1" , notCheckable = true , minWidth = 15 , func = function () RE :SmallButton (1 , true ); CloseDropDownMenus () end },
246- { text = " 2" , notCheckable = true , minWidth = 15 , func = function () RE :SmallButton (2 , true ); CloseDropDownMenus () end },
247- { text = " 3" , notCheckable = true , minWidth = 15 , func = function () RE :SmallButton (3 , true ); CloseDropDownMenus () end },
248- { text = " 4" , notCheckable = true , minWidth = 15 , func = function () RE :SmallButton (4 , true ); CloseDropDownMenus () end },
249- { text = " 5" , notCheckable = true , minWidth = 15 , func = function () RE :SmallButton (5 , true ); CloseDropDownMenus () end },
250- { text = " 5+" , notCheckable = true , minWidth = 15 , func = function () RE :SmallButton (6 , true ); CloseDropDownMenus () end }
251- } },
252- { text = HELP_LABEL , notCheckable = true , func = function () RE :BigButton (true , true ) end },
253- { text = L [" Clear" ], notCheckable = true , func = function () RE :BigButton (false , true ) end },
254- { text = " " , notCheckable = true , disabled = true },
255- { text = ATTACK , notCheckable = true , func = function () RE :ReportDropDownClick (" Attack" ) end },
256- { text = L [" Guard" ], notCheckable = true , func = function () RE :ReportDropDownClick (" Guard" ) end },
257- { text = L [" Heavily defended" ], notCheckable = true , func = function () RE :ReportDropDownClick (" Heavily defended" ) end },
258- { text = L [" Losing" ], notCheckable = true , func = function () RE :ReportDropDownClick (" Losing" ) end },
259- { text = " " , notCheckable = true , disabled = true },
260- { text = L [" On my way" ], notCheckable = true , func = function () RE :ReportDropDownClick (" On my way" ) end },
261- { text = L [" Report status" ], notCheckable = true , func = function () RE :ReportDropDownClick (" " ) end }
262- }
263242RE .DefaultConfig = {
264243 profile = {
265244 BarHandle = 11 ,
@@ -495,6 +474,26 @@ function RE:FramesOverlap(frameA, frameB)
495474 and (frameB :GetBottom () * sB ) < (frameA :GetTop () * sA )
496475end
497476
477+ function RE :POIDropDown (root )
478+ local submenu = root :CreateButton (L [" Incoming" ])
479+ submenu :CreateButton (" 1" , function () RE :SmallButton (1 , true ) end )
480+ submenu :CreateButton (" 2" , function () RE :SmallButton (2 , true ) end )
481+ submenu :CreateButton (" 3" , function () RE :SmallButton (3 , true ) end )
482+ submenu :CreateButton (" 4" , function () RE :SmallButton (4 , true ) end )
483+ submenu :CreateButton (" 5" , function () RE :SmallButton (5 , true ) end )
484+ submenu :CreateButton (" 5+" , function () RE :SmallButton (6 , true ) end )
485+ root :CreateButton (HELP_LABEL , function () RE :BigButton (true , true ) end )
486+ root :CreateButton (L [" Clear" ], function () RE :BigButton (false , true ) end )
487+ root :CreateDivider ()
488+ root :CreateButton (ATTACK , function () RE :ReportDropDownClick (" Attack" ) end )
489+ root :CreateButton (L [" Guard" ], function () RE :ReportDropDownClick (" Guard" ) end )
490+ root :CreateButton (L [" Heavily defended" ], function () RE :ReportDropDownClick (" Heavily defended" ) end )
491+ root :CreateButton (L [" Losing" ], function () RE :ReportDropDownClick (" Losing" ) end )
492+ root :CreateDivider ()
493+ root :CreateButton (L [" On my way" ], function () RE :ReportDropDownClick (" On my way" ) end )
494+ root :CreateButton (L [" Report status" ], function () RE :ReportDropDownClick (" " ) end )
495+ end
496+
498497function RE :CreatePOI (index )
499498 local frameMain = CreateFrame (" Frame" , " REPorterFrameCorePOI" .. index , REPorterFrameCorePOI )
500499 frameMain :SetFrameLevel (10 )
@@ -1254,7 +1253,7 @@ function RE:OnClickPOI(self)
12541253
12551254 CloseDropDownMenus ()
12561255 RE .ClickedPOI = RE .POINodes [self .name ].name
1257- EasyMenu ( RE .POIDropDown , REPorterReportDropDown , self , 0 , 0 , " MENU " )
1256+ MenuUtil . CreateContextMenu ( UIParent , RE .POIDropDown )
12581257end
12591258---
12601259
0 commit comments