unitframes: add tooltips to missing unitframes

This commit is contained in:
shagu
2016-12-18 20:15:45 +01:00
parent 8490f49c4c
commit 2a02beb308
4 changed files with 39 additions and 1 deletions
+10
View File
@@ -16,6 +16,16 @@ pfUI:RegisterModule("pet", function ()
pfUI.utils:UpdateMovable(pfUI.uf.pet)
pfUI.uf.pet:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
pfUI.uf.pet:SetScript("OnEnter", function()
GameTooltip_SetDefaultAnchor(GameTooltip, this)
GameTooltip:SetUnit(this.label .. this.id)
GameTooltip:Show()
end)
pfUI.uf.pet:SetScript("OnLeave", function()
GameTooltip:FadeOut()
end)
pfUI.uf.pet:SetScript("OnClick", function ()
TargetUnit("pet")
end)
+10
View File
@@ -17,6 +17,16 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOM", -75, 125)
pfUI.utils:UpdateMovable(pfUI.uf.player)
pfUI.uf.player:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
pfUI.uf.player:SetScript("OnEnter", function()
GameTooltip_SetDefaultAnchor(GameTooltip, this)
GameTooltip:SetUnit(this.label .. this.id)
GameTooltip:Show()
end)
pfUI.uf.player:SetScript("OnLeave", function()
GameTooltip:FadeOut()
end)
pfUI.uf.player:SetScript("OnClick", function ()
if arg1 == "RightButton" then
ToggleDropDownMenu(1, nil, pfUI.uf.player.Dropdown,"cursor")
+10 -1
View File
@@ -22,8 +22,17 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target:SetHeight(pfUI_config.unitframes.target.height + pfUI_config.unitframes.target.pheight + 2*default_border + pfUI_config.unitframes.target.pspace)
pfUI.uf.target:SetPoint("BOTTOMLEFT", UIParent, "BOTTOM", 75, 125)
pfUI.utils:UpdateMovable(pfUI.uf.target)
pfUI.uf.target:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
pfUI.uf.target:SetScript("OnEnter", function()
GameTooltip_SetDefaultAnchor(GameTooltip, this)
GameTooltip:SetUnit(this.label .. this.id)
GameTooltip:Show()
end)
pfUI.uf.target:SetScript("OnLeave", function()
GameTooltip:FadeOut()
end)
pfUI.uf.target:SetScript("OnClick", function ()
if arg1 == "RightButton" then
ToggleDropDownMenu(1, nil, TargetFrameDropDown, "cursor")
+9
View File
@@ -24,6 +24,15 @@ pfUI:RegisterModule("targettarget", function ()
pfUI.utils:UpdateMovable(pfUI.uf.targettarget)
pfUI.uf.targettarget:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
pfUI.uf.targettarget:SetScript("OnEnter", function()
GameTooltip_SetDefaultAnchor(GameTooltip, this)
GameTooltip:SetUnit(this.label .. this.id)
GameTooltip:Show()
end)
pfUI.uf.targettarget:SetScript("OnLeave", function()
GameTooltip:FadeOut()
end)
pfUI.uf.targettarget:SetScript("OnClick", function ()
TargetUnit("targettarget")