Skip to content

Commit

Permalink
The dragging arrow can no longer leave the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Numynum committed Dec 4, 2024
1 parent ba6e906 commit 636182d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions BlizzMovePlugin_QuestTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local CreateFrame = _G.CreateFrame;
local ObjectiveTrackerFrame = _G.ObjectiveTrackerFrame;
local QuestWatchFrame = _G.QuestWatchFrame;
local WatchFrame = _G.WatchFrame;
--- @type BlizzMoveAPI
local BlizzMoveAPI = _G.BlizzMoveAPI;
local print = _G.print;
local IsAddOnLoaded = _G.C_AddOns.IsAddOnLoaded;
Expand All @@ -22,6 +23,8 @@ function Plugin:CreateMoveHandleAtPoint(parentFrame, anchorPoint, relativePoint,
handleFrame:SetHeight(16);
handleFrame:SetWidth(16);
handleFrame:SetFrameStrata(parentFrame:GetFrameStrata());
handleFrame:SetClampedToScreen(true);
handleFrame:SetClampRectInsets(0, 0, 0, 0);

handleFrame.texture = handleFrame:CreateTexture();
handleFrame.texture:SetTexture('Interface/Buttons/UI-Panel-BiggerButton-Up');
Expand Down Expand Up @@ -52,8 +55,8 @@ function Plugin:ADDON_LOADED(addonName)
ObjectiveTrackerFrame,
'CENTER',
'TOPRIGHT',
0,
-12
5,
-5
);
elseif (QuestWatchFrame) then
frameName = 'QuestWatchFrame';
Expand All @@ -76,19 +79,19 @@ function Plugin:ADDON_LOADED(addonName)
WatchFrame:SetHeight(WatchFrame:GetHeight());
end

local frameTable = {
BlizzMoveAPI:RegisterAddOnFrames({
[name] = {
[frameName] = {
IgnoreMouse = true,
SubFrames = {
['BlizzMovePlugin-QuestTrackerButton'] = {
FrameReference = self.MoveHandleFrame,
IgnoreClamping = true,
},
},
},
},
};
BlizzMoveAPI:RegisterAddOnFrames(frameTable);
});

EventRegistry:RegisterCallback('EditMode.Exit', Plugin.OnEditModeExit, Plugin);
end
Expand Down

0 comments on commit 636182d

Please sign in to comment.