Skip to content

Commit

Permalink
Hide Location and instance difficulty when expanded
Browse files Browse the repository at this point in the history
#60

Item #2.
  • Loading branch information
stoglim authored and Ravendwyr committed Jan 3, 2021
1 parent b8453e5 commit 7a44516
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Modules/Expander.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ function Expander:Refresh(fromCombat)
end
end

MiniMapInstanceDifficulty:Hide()
GuildInstanceDifficulty:Hide()
MiniMapChallengeMode:Hide()

if((Chinchilla:GetModule("Location", true) and Chinchilla:GetModule("Location"):IsEnabled())) then
Chinchilla:GetModule("Location"):Hide()
end

if(self.db.profile.hideCombat) then
MinimapBackdrop:RegisterEvent('PLAYER_REGEN_DISABLED')
MinimapBackdrop:RegisterEvent('PLAYER_REGEN_ENABLED')
Expand Down Expand Up @@ -111,6 +119,12 @@ function Expander:Refresh(fromCombat)
end
end

if((Chinchilla:GetModule("Location", true) and Chinchilla:GetModule("Location"):IsEnabled())) then
Chinchilla:GetModule("Location"):Show()
end

MiniMapInstanceDifficulty_Update()

if(self.db.profile.hideCombat and fromCombat ~= true) then
MinimapBackdrop:UnregisterEvent('PLAYER_REGEN_DISABLED')
MinimapBackdrop:UnregisterEvent('PLAYER_REGEN_ENABLED')
Expand Down
7 changes: 7 additions & 0 deletions Modules/Location.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ function Location:SetMovable(value)
else frame:RegisterForDrag() end
end

function Location:Hide()
frame:Hide()
end

function Location:Show()
frame:Show()
end

function Location:GetOptions()
return {
Expand Down

0 comments on commit 7a44516

Please sign in to comment.