Skip to content

Commit

Permalink
cata use new menu in emove
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Oct 31, 2024
1 parent 9f07ec9 commit 8f2abc7
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions ElvUI/Core/General/Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function E:ToggleMoveMode(which)

E.MoverPopupWindow:Show()

if not E.Retail then
if E.Classic then
_G.UIDropDownMenu_SetSelectedValue(E.MoverPopupDropdown, strupper(which))
end

Expand Down Expand Up @@ -219,18 +219,7 @@ do
end

function E:ConfigMode_Initialize(root)
if E.Retail then
root:SetTag('ELVUI_MOVER_LAYOUT')

for _, configMode in ipairs(E.ConfigModeLayouts) do
root:CreateRadio(E.ConfigModeLocalizedStrings[configMode], IsSelected, SetSelected, configMode)
end

--[[if self.menu then -- 11.0 this doesnt work...
self.menu:SetFrameStrata('DIALOG')
self.menu:SetFrameLevel(1200)
end]]
else
if E.Classic then
local info = _G.UIDropDownMenu_CreateInfo()
info.func = E.ConfigMode_OnClick

Expand All @@ -241,6 +230,17 @@ do
end

_G.UIDropDownMenu_SetSelectedValue(E.MoverPopupDropdown, E.MoverPopupDropdown.selectedValue or 'ALL')
else
root:SetTag('ELVUI_MOVER_LAYOUT')

for _, configMode in ipairs(E.ConfigModeLayouts) do
root:CreateRadio(E.ConfigModeLocalizedStrings[configMode], IsSelected, SetSelected, configMode)
end

--[[if self.menu then -- 11.0 this doesnt work...
self.menu:SetFrameStrata('DIALOG')
self.menu:SetFrameLevel(1200)
end]]
end
end
end
Expand Down Expand Up @@ -412,7 +412,7 @@ function E:CreateMoverPopup()
end
end)

local dropDown = CreateFrame(E.Retail and 'DropdownButton' or 'Frame', f:GetName()..'DropDown', f, E.Retail and 'WowStyle1DropdownTemplate' or 'UIDropDownMenuTemplate')
local dropDown = CreateFrame(E.Classic and 'Frame' or 'DropdownButton', f:GetName()..'DropDown', f, E.Classic and 'UIDropDownMenuTemplate' or 'WowStyle1DropdownTemplate')
dropDown:Point('BOTTOMRIGHT', lock, 'TOPRIGHT', 2, 0)
S:HandleDropDownBox(dropDown, 160)

Expand All @@ -425,10 +425,10 @@ function E:CreateMoverPopup()

f.dropDown = dropDown

if E.Retail then
dropDown:SetupMenu(E.ConfigMode_Initialize)
else
if E.Classic then
_G.UIDropDownMenu_Initialize(dropDown, E.ConfigMode_Initialize)
else
dropDown:SetupMenu(E.ConfigMode_Initialize)
end

local nudgeFrame = CreateFrame('Frame', 'ElvUIMoverNudgeWindow', E.UIParent)
Expand Down

0 comments on commit 8f2abc7

Please sign in to comment.