tooltip: add option for extended guild information

This commit is contained in:
shagu
2017-01-15 13:22:30 +01:00
parent 7084f59815
commit 559df63de3
3 changed files with 11 additions and 2 deletions
+1
View File
@@ -130,6 +130,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0")
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
pfUI:UpdateConfig("tooltip", nil, "extguild", "1")
pfUI:UpdateConfig("tooltip", "compare", "showalways", "0")
pfUI:UpdateConfig("tooltip", "vendor", "showalways", "0")
+1
View File
@@ -965,6 +965,7 @@ pfUI:RegisterModule("gui", function ()
-- tooltip
pfUI.gui.tooltip = pfUI.gui:CreateConfigTab("Tooltip")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Tooltip Position:", pfUI_config.tooltip, "position", "dropdown", { "bottom", "chat", "cursor" })
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Show extended guild information:", pfUI_config.tooltip, "extguild", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Always show comparison:", pfUI_config.tooltip.compare, "showalways", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Always show extended vendor values:", pfUI_config.tooltip.vendor, "showalways", "checkbox")
+9 -2
View File
@@ -85,7 +85,7 @@ pfUI.api:CreateBackdrop(GameTooltip)
local _, targetClass = UnitClass(unit .. "target")
local targetReaction = UnitReaction("player",unit .. "target")
local _, class = UnitClass(unit)
local guild = GetGuildInfo(unit)
local guild, rankstr, rankid = GetGuildInfo(unit)
local reaction = UnitReaction(unit, "player")
local pvptitle = gsub(pvpname or name," "..name, "", 1)
local hp = UnitHealth(unit)
@@ -110,7 +110,14 @@ pfUI.api:CreateBackdrop(GameTooltip)
end
if guild then
GameTooltip:AddLine("<" .. guild .. ">", 0.3, 1, 0.5)
local rank = ""
local lead = ""
if pfUI_config.tooltip.extguild == "1" then
if rankstr then rank = " |cffaaaaaa(" .. rankstr .. ")" end
if rankid and rankid == 0 then lead = "|cffffcc00*|r" end
end
GameTooltip:AddLine("<" .. guild .. ">" .. lead .. rank, 0.3, 1, 0.5)
end
if target then