mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-17 02:00:49 +00:00
tooltip: add option for extended guild information
This commit is contained in:
@@ -130,6 +130,7 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0")
|
pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0")
|
||||||
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
|
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
|
||||||
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
||||||
|
pfUI:UpdateConfig("tooltip", nil, "extguild", "1")
|
||||||
pfUI:UpdateConfig("tooltip", "compare", "showalways", "0")
|
pfUI:UpdateConfig("tooltip", "compare", "showalways", "0")
|
||||||
pfUI:UpdateConfig("tooltip", "vendor", "showalways", "0")
|
pfUI:UpdateConfig("tooltip", "vendor", "showalways", "0")
|
||||||
|
|
||||||
|
|||||||
@@ -965,6 +965,7 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
-- tooltip
|
-- tooltip
|
||||||
pfUI.gui.tooltip = pfUI.gui:CreateConfigTab("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, "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 comparison:", pfUI_config.tooltip.compare, "showalways", "checkbox")
|
||||||
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Always show extended vendor values:", pfUI_config.tooltip.vendor, "showalways", "checkbox")
|
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Always show extended vendor values:", pfUI_config.tooltip.vendor, "showalways", "checkbox")
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -85,7 +85,7 @@ pfUI.api:CreateBackdrop(GameTooltip)
|
|||||||
local _, targetClass = UnitClass(unit .. "target")
|
local _, targetClass = UnitClass(unit .. "target")
|
||||||
local targetReaction = UnitReaction("player",unit .. "target")
|
local targetReaction = UnitReaction("player",unit .. "target")
|
||||||
local _, class = UnitClass(unit)
|
local _, class = UnitClass(unit)
|
||||||
local guild = GetGuildInfo(unit)
|
local guild, rankstr, rankid = GetGuildInfo(unit)
|
||||||
local reaction = UnitReaction(unit, "player")
|
local reaction = UnitReaction(unit, "player")
|
||||||
local pvptitle = gsub(pvpname or name," "..name, "", 1)
|
local pvptitle = gsub(pvpname or name," "..name, "", 1)
|
||||||
local hp = UnitHealth(unit)
|
local hp = UnitHealth(unit)
|
||||||
@@ -110,7 +110,14 @@ pfUI.api:CreateBackdrop(GameTooltip)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if guild then
|
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
|
end
|
||||||
|
|
||||||
if target then
|
if target then
|
||||||
|
|||||||
Reference in New Issue
Block a user