Skip to content

Commit

Permalink
creation of new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
EdouraDEV committed Apr 25, 2023
1 parent 542ada6 commit 3e85dce
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,18 @@ function WarpDeplete:DisableDemoMode()
self:ResetState()
end

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

if IsAddOnLoaded('SylingTracker') then
return
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 @@ -219,19 +218,35 @@ function WarpDeplete:Show()
end)
end

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

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

if not IsAddOnLoaded('SylingTracker') then
ObjectiveTrackerFrame:Show()
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()

self:ShowBlizzardObjectiveTracker()
self:ShowExternals()
end


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

2 comments on commit 3e85dce

@EdouraDEV
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With a little delay here I am again. I'll let you do your tests on your side. Don't hesitate to come back to me for more info.

@happenslol
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you. I'll have a look.

Please sign in to comment.