Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exception for Syling Tracker #44

Merged
merged 3 commits into from
Apr 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,18 @@ function WarpDeplete:DisableDemoMode()
self:ResetState()
end

function WarpDeplete:Show()
self.isShown = true
self.frames.root:Show()
self:UpdateLayout()
function WarpDeplete:ShowBlizzardObjectiveTracker()
-- As SylingTracker replaces the blizzard objective tracker in hiding
-- it, we prevent WarpDeplete to reshown the tracker.
if IsAddOnLoaded("SylingTracker") then
return
end

ObjectiveTrackerFrame:Show()
end

function WarpDeplete:HideBlizzardObjectiveTracker()
ObjectiveTrackerFrame:Hide()
if KT ~= nil then
KT.frame:Hide()
end

-- Sometimes, the objective tracker isn't hidden
-- correctly. This can happen when WarpDeplete is
Expand All @@ -215,16 +218,36 @@ function WarpDeplete:Show()
end)
end

function WarpDeplete:ShowExternals()
if KT ~= nil then
KT.frame:Show()
end
end

function WarpDeplete:HideExternals()
if KT ~= nil then
KT.frame:Hide()
end
end

function WarpDeplete:Show()
self.isShown = true
self.frames.root:Show()
self:UpdateLayout()

self:HideBlizzardObjectiveTracker()
self:HideExternals()
end

function WarpDeplete:Hide()
self.isShown = false
self.frames.root:Hide()

if KT ~= nil then
KT.frame:Show()
end
ObjectiveTrackerFrame:Show()
self:ShowBlizzardObjectiveTracker()
self:ShowExternals()
end


function WarpDeplete:ResetState()
self:PrintDebug("Resetting state")

Expand Down