-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added option to Colpase the display and only show the total row(s). Mousing over the display will show the full display. Added logic to ensure that the filter button is never hidden off screen, it will now move it it was positioned off screen when moving the display position. Fixed potential frame taint issue.
- Loading branch information
Showing
6 changed files
with
215 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
local GT = LibStub("AceAddon-3.0"):GetAddon("GatheringTracker") | ||
|
||
function GT:ColpaseDisplay() | ||
GT.Debug("ColpaseDisplay", 1) | ||
for itemID, itemFrame in pairs(GT.Display.Frames) do | ||
if itemID < 9999999998 then | ||
itemFrame:Hide() | ||
end | ||
if itemID == 9999999998 then | ||
itemFrame:SetPoint("TOPLEFT", GT.baseFrame.backdrop, "TOPLEFT") | ||
end | ||
end | ||
end | ||
|
||
function GT:ExpandDisplay() | ||
GT.Debug("ExpandDisplay", 1) | ||
for itemID, itemFrame in pairs(GT.Display.Frames) do | ||
if itemID < 9999999998 then | ||
itemFrame:Show() | ||
end | ||
end | ||
GT:AllignRows() | ||
end | ||
|
||
function GT:ColpaseManager(wait) | ||
GT.Debug("ColpaseManager", 1, wait, GT.db.profile.General.colpaseDisplay, GT.db.profile.General.colpaseTime) | ||
if wait then | ||
GT:wait(GT.db.profile.General.colpaseTime, "ColpaseManager", false) | ||
return | ||
end | ||
|
||
if GT.db.profile.General.colpaseDisplay then | ||
GT:ColpaseDisplay() | ||
if GT.Display.Frames[9999999998] then | ||
GT.Display.Frames[9999999998]:SetScript("OnEnter", function(self, motion) | ||
if motion then | ||
GT:ExpandDisplay() | ||
GT.baseFrame.frame:SetScript("OnLeave", function(self, motion) | ||
GT:wait(GT.db.profile.General.colpaseTime, "ColpaseManager", false) | ||
GT.baseFrame.frame:SetScript("OnLeave", nil) | ||
GT.baseFrame.frame:SetMouseClickEnabled(false) | ||
end) | ||
GT:ClearMouse() | ||
end | ||
end) | ||
else | ||
GT:SetupTotalsRow() | ||
GT:AllignRows() | ||
GT:AllignColumns() | ||
GT:UpdateBaseFrameSize() | ||
GT:ColpaseManager(false) | ||
end | ||
if GT.Display.Frames[9999999999] then | ||
GT.Display.Frames[9999999999]:SetScript("OnEnter", function(self, motion) | ||
if motion then | ||
GT:ExpandDisplay() | ||
GT.baseFrame.frame:SetScript("OnLeave", function(self, motion) | ||
GT:wait(GT.db.profile.General.colpaseTime, "ColpaseManager", false) | ||
GT.baseFrame.frame:SetScript("OnLeave", nil) | ||
GT.baseFrame.frame:SetMouseClickEnabled(false) | ||
end) | ||
GT:ClearMouse() | ||
end | ||
end) | ||
end | ||
else | ||
GT:ExpandDisplay() | ||
GT:wait(nil, "ColpaseManager") | ||
|
||
GT.baseFrame.frame:SetScript("OnLeave", nil) | ||
|
||
GT:ClearMouse() | ||
|
||
if #GT.Display.Order == 1 then | ||
GT:PrepareDataForDisplay("ColpaseManager", false) | ||
end | ||
end | ||
end | ||
|
||
function GT:ClearMouse() | ||
GT.baseFrame.frame:SetMouseClickEnabled(false) | ||
|
||
if GT.Display.Frames[9999999998] then | ||
GT.Display.Frames[9999999998]:SetScript("OnEnter", nil) | ||
GT.Display.Frames[9999999998]:SetMouseClickEnabled(false) | ||
GT.Display.Frames[9999999998]:SetMouseMotionEnabled(false) | ||
end | ||
|
||
if GT.Display.Frames[9999999999] then | ||
GT.Display.Frames[9999999999]:SetScript("OnEnter", nil) | ||
GT.Display.Frames[9999999999]:SetMouseClickEnabled(false) | ||
GT.Display.Frames[9999999999]:SetMouseMotionEnabled(false) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.