Skip to content

Commit

Permalink
- prevented auras from moving off-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
frozn committed May 27, 2024
1 parent de390be commit 509811f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions TipTac/modules/ttStyle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -793,14 +793,6 @@ function ttStyle:OnUnitTipStyle(TT_CacheForFrames, tip, currentDisplayParams, fi
end

function ttStyle:OnTipResetCurrentDisplayParams(TT_CacheForFrames, tip, currentDisplayParams)
-- reset current display params for unit appearance
currentDisplayParams.tipLineInfoIndex = nil;
currentDisplayParams.tipLineTargetedByIndex = nil;
currentDisplayParams.petLineLevelIndex = nil;
currentDisplayParams.mergeLevelLineWithGuildName = nil;
end

function ttStyle:OnTipPostResetCurrentDisplayParams(TT_CacheForFrames, tip, currentDisplayParams)
-- hide tip's top/bottom overlay currently highlighting TipTac developer
if (currentDisplayParams.isSetTopOverlayToHighlightTipTacDeveloper) and (tip.TopOverlay) then
tip.TopOverlay:Hide();
Expand All @@ -810,6 +802,10 @@ function ttStyle:OnTipPostResetCurrentDisplayParams(TT_CacheForFrames, tip, curr
end

-- reset current display params for unit appearance
currentDisplayParams.tipLineInfoIndex = nil;
currentDisplayParams.tipLineTargetedByIndex = nil;
currentDisplayParams.petLineLevelIndex = nil;
currentDisplayParams.mergeLevelLineWithGuildName = nil;
currentDisplayParams.isSetTopOverlayToHighlightTipTacDeveloper = nil;
currentDisplayParams.isSetBottomOverlayToHighlightTipTacDeveloper = nil;
end
end
2 changes: 1 addition & 1 deletion TipTac/ttCore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2633,7 +2633,7 @@ LibFroznFunctions:RegisterForGroupEvents(MOD_NAME, {
currentDisplayParams.originalLeftOffsetForPreventingOffScreen, currentDisplayParams.originalRightOffsetForPreventingOffScreen, currentDisplayParams.originalTopOffsetForPreventingOffScreen, currentDisplayParams.originalBottomOffsetForPreventingOffScreen = nil, nil, nil, nil;
end
end,
OnTipPostResetCurrentDisplayParams = function(self, TT_CacheForFrames, tip, currentDisplayParams)
OnTipResetCurrentDisplayParams = function(self, TT_CacheForFrames, tip, currentDisplayParams)
-- restore original offsets for preventing additional elements from moving off-screen
if (not tip:IsForbidden()) and (currentDisplayParams.originalLeftOffsetForPreventingOffScreen) and (currentDisplayParams.originalRightOffsetForPreventingOffScreen) and (currentDisplayParams.originalTopOffsetForPreventingOffScreen) and (currentDisplayParams.originalBottomOffsetForPreventingOffScreen) then
tip:SetClampRectInsets(currentDisplayParams.originalLeftOffsetForPreventingOffScreen, currentDisplayParams.originalRightOffsetForPreventingOffScreen, currentDisplayParams.originalTopOffsetForPreventingOffScreen, currentDisplayParams.originalBottomOffsetForPreventingOffScreen);
Expand Down

0 comments on commit 509811f

Please sign in to comment.