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

Forbidden tooltips #696

Merged
merged 3 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion elements/alternativepower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ local function updateTooltip(self)
end

local function onEnter(self)
if(not self:IsVisible()) then return end
if(GameTooltip:IsForbidden() or not self:IsVisible()) then return end

GameTooltip_SetDefaultAnchor(GameTooltip, self)
self:UpdateTooltip()
end

local function onLeave()
if(GameTooltip:IsForbidden()) then return end

GameTooltip:Hide()
end

Expand Down
4 changes: 3 additions & 1 deletion elements/phaseindicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ local function UpdateTooltip(element)
end

local function onEnter(element)
if(not element:IsVisible()) then return end
if(GameTooltip:IsForbidden() or not element:IsVisible()) then return end

if(element.reason) then
GameTooltip:SetOwner(element, 'ANCHOR_BOTTOMRIGHT')
Expand All @@ -59,6 +59,8 @@ local function onEnter(element)
end

local function onLeave()
if(GameTooltip:IsForbidden()) then return end

GameTooltip:Hide()
end

Expand Down
4 changes: 3 additions & 1 deletion elements/totems.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ local function UpdateTooltip(self)
end

local function OnEnter(self)
if(not self:IsVisible()) then return end
if(GameTooltip:IsForbidden() or not self:IsVisible()) then return end

GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT')
self:UpdateTooltip()
end

local function OnLeave()
if(GameTooltip:IsForbidden()) then return end

GameTooltip:Hide()
end

Expand Down