diff --git a/BlizzMovePlugin_QuestTracker.lua b/BlizzMovePlugin_QuestTracker.lua index 7a1ddf9..a9b145d 100644 --- a/BlizzMovePlugin_QuestTracker.lua +++ b/BlizzMovePlugin_QuestTracker.lua @@ -5,37 +5,39 @@ local ObjectiveTrackerFrame = _G.ObjectiveTrackerFrame; local BlizzMoveAPI = _G.BlizzMoveAPI; local print = _G.print; local IsAddOnLoaded = _G.IsAddOnLoaded; +local UIParent = _G.UIParent; -local name = ...; +local name = ... or 'BlizzMovePlugin_QuestTracker'; _G.BlizzMovePlugin_QuestTracker = {}; -local plugin = _G.BlizzMovePlugin_QuestTracker; +local Plugin = _G.BlizzMovePlugin_QuestTracker; local frame = CreateFrame('Frame'); -frame:HookScript('OnEvent', function(_, _, addonName) plugin:ADDON_LOADED(addonName); end); +frame:HookScript('OnEvent', function(_, _, addonName) Plugin:ADDON_LOADED(addonName); end); frame:RegisterEvent('ADDON_LOADED'); -plugin.frameTable = { +Plugin.frameTable = { [name] = { ["ObjectiveTrackerFrame"] = { - MinVersion = 20000, + MinVersion = 30000, -- added when? IgnoreMouse = true, SubFrames = { ['BlizzMovePlugin_QuestTracker.MoveHandleFrame'] = { - MinVersion = 20000, + MinVersion = 30000, -- added when? }, }, }, }, }; -function plugin:CreateMoveHandleAtPoint(parentFrame, anchorPoint, relativePoint, offX, offY) +function Plugin:CreateMoveHandleAtPoint(parentFrame, anchorPoint, relativePoint, offX, offY) if (not parentFrame) then return nil; end - local handleFrame = CreateFrame('Frame'); + local handleFrame = CreateFrame('Frame', nil, UIParent); handleFrame:SetPoint(anchorPoint, parentFrame, relativePoint, offX, offY); handleFrame:SetHeight(16); handleFrame:SetWidth(16); + handleFrame:SetFrameStrata(parentFrame:GetFrameStrata()); handleFrame.texture = handleFrame:CreateTexture(); handleFrame.texture:SetTexture('Interface/Buttons/UI-Panel-BiggerButton-Up'); @@ -45,7 +47,7 @@ function plugin:CreateMoveHandleAtPoint(parentFrame, anchorPoint, relativePoint, return handleFrame; end -function plugin:ADDON_LOADED(addonName) +function Plugin:ADDON_LOADED(addonName) if (addonName == 'BlizzMove' or (addonName == name and IsAddOnLoaded('BlizzMove'))) then if (not BlizzMoveAPI or not BlizzMoveAPI.RegisterAddOnFrames) then print(name .. ' - Incompatible BlizzMove version is installed, please update BlizzMove!');