diff --git a/api/config.lua b/api/config.lua index 08241d1d..13ae93d3 100644 --- a/api/config.lua +++ b/api/config.lua @@ -121,6 +121,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "player", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "player", "clickcast", "0") pfUI:UpdateConfig("unitframes", "player", "faderange", "0") + pfUI:UpdateConfig("unitframes", "player", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "player", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "player", "powercolor", "1") pfUI:UpdateConfig("unitframes", "player", "levelcolor", "1") @@ -155,6 +156,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "target", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "target", "clickcast", "0") pfUI:UpdateConfig("unitframes", "target", "faderange", "0") + pfUI:UpdateConfig("unitframes", "target", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "target", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "target", "powercolor", "1") pfUI:UpdateConfig("unitframes", "target", "levelcolor", "1") @@ -186,6 +188,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "focus", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "focus", "clickcast", "0") pfUI:UpdateConfig("unitframes", "focus", "faderange", "0") + pfUI:UpdateConfig("unitframes", "focus", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "focus", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "focus", "powercolor", "1") pfUI:UpdateConfig("unitframes", "focus", "levelcolor", "1") @@ -216,6 +219,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "group", "debuff_indicator", "1") pfUI:UpdateConfig("unitframes", "group", "clickcast", "0") pfUI:UpdateConfig("unitframes", "group", "faderange", "1") + pfUI:UpdateConfig("unitframes", "group", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "group", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "group", "powercolor", "1") pfUI:UpdateConfig("unitframes", "group", "levelcolor", "1") @@ -247,6 +251,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "grouptarget", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "grouptarget", "clickcast", "0") pfUI:UpdateConfig("unitframes", "grouptarget", "faderange", "1") + pfUI:UpdateConfig("unitframes", "grouptarget", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "grouptarget", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "grouptarget", "powercolor", "1") pfUI:UpdateConfig("unitframes", "grouptarget", "levelcolor", "1") @@ -277,6 +282,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "grouppet", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "grouppet", "clickcast", "0") pfUI:UpdateConfig("unitframes", "grouppet", "faderange", "1") + pfUI:UpdateConfig("unitframes", "grouppet", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "grouppet", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "grouppet", "powercolor", "1") pfUI:UpdateConfig("unitframes", "grouppet", "levelcolor", "1") @@ -307,6 +313,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "raid", "debuff_indicator", "1") pfUI:UpdateConfig("unitframes", "raid", "clickcast", "0") pfUI:UpdateConfig("unitframes", "raid", "faderange", "1") + pfUI:UpdateConfig("unitframes", "raid", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "raid", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "raid", "powercolor", "1") pfUI:UpdateConfig("unitframes", "raid", "levelcolor", "1") @@ -337,6 +344,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "ttarget", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "ttarget", "clickcast", "0") pfUI:UpdateConfig("unitframes", "ttarget", "faderange", "0") + pfUI:UpdateConfig("unitframes", "ttarget", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "ttarget", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "ttarget", "powercolor", "1") pfUI:UpdateConfig("unitframes", "ttarget", "levelcolor", "1") @@ -367,6 +375,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "pet", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "pet", "clickcast", "0") pfUI:UpdateConfig("unitframes", "pet", "faderange", "0") + pfUI:UpdateConfig("unitframes", "pet", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "pet", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "pet", "powercolor", "1") pfUI:UpdateConfig("unitframes", "pet", "levelcolor", "1") @@ -397,6 +406,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", "fallback", "debuff_indicator", "0") pfUI:UpdateConfig("unitframes", "fallback", "clickcast", "0") pfUI:UpdateConfig("unitframes", "fallback", "faderange", "0") + pfUI:UpdateConfig("unitframes", "fallback", "showtooltip", "1") pfUI:UpdateConfig("unitframes", "fallback", "healthcolor", "1") pfUI:UpdateConfig("unitframes", "fallback", "powercolor", "1") pfUI:UpdateConfig("unitframes", "fallback", "levelcolor", "1") diff --git a/api/unitframes.lua b/api/unitframes.lua index 2f380b7a..5196e651 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -372,6 +372,7 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) end) f:SetScript("OnEnter", function() if not this.label then return end + if this.config.showtooltip == "0" then return end GameTooltip_SetDefaultAnchor(GameTooltip, this) GameTooltip:SetUnit(this.label .. this.id) GameTooltip:Show() diff --git a/modules/gui.lua b/modules/gui.lua index 2c64d61d..c8fcbce2 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -722,6 +722,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.player, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.player, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.player, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.player, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.player, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.player, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.player, "levelcolor", "checkbox") @@ -762,6 +763,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.target, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.target, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.target, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.target, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.target, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.target, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.target, "levelcolor", "checkbox") @@ -801,6 +803,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.ttarget, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.ttarget, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.ttarget, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.ttarget, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.ttarget, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.ttarget, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.ttarget, "levelcolor", "checkbox") @@ -840,6 +843,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.pet, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.pet, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.pet, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.pet, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.pet, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.pet, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.pet, "levelcolor", "checkbox") @@ -879,6 +883,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.focus, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.focus, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.focus, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.focus, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.focus, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.focus, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.focus, "levelcolor", "checkbox") @@ -943,6 +948,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.raid, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.raid, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.raid, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.raid, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.raid, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.raid, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.raid, "levelcolor", "checkbox") @@ -982,6 +988,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.group, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.group, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.group, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.group, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.group, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.group, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.group, "levelcolor", "checkbox") @@ -1021,6 +1028,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.grouptarget, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.grouptarget, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.grouptarget, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.grouptarget, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.grouptarget, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.grouptarget, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.grouptarget, "levelcolor", "checkbox") @@ -1060,6 +1068,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Enable Debuff Indicators"], C.unitframes.grouppet, "debuff_indicator", "checkbox") CreateConfig(this, T["Enable Clickcast"], C.unitframes.grouppet, "clickcast", "checkbox") CreateConfig(this, T["Enable Range Fading"], C.unitframes.grouppet, "faderange", "checkbox") + CreateConfig(this, T["Show Tooltip On Mouseover"], C.unitframes.grouppet, "showtooltip", "checkbox") CreateConfig(this, T["Enable Health Color in Text"], C.unitframes.grouppet, "healthcolor", "checkbox") CreateConfig(this, T["Enable Power Color in Text"], C.unitframes.grouppet, "powercolor", "checkbox") CreateConfig(this, T["Enable Level Color in Text"], C.unitframes.grouppet, "levelcolor", "checkbox")