mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 21:50:00 +00:00
tooltip: add option for custom transparency
This commit is contained in:
@@ -131,6 +131,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
|
||||
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
||||
pfUI:UpdateConfig("tooltip", nil, "extguild", "1")
|
||||
pfUI:UpdateConfig("tooltip", nil, "alpha", "0.8")
|
||||
pfUI:UpdateConfig("tooltip", "compare", "showalways", "0")
|
||||
pfUI:UpdateConfig("tooltip", "vendor", "showalways", "0")
|
||||
|
||||
|
||||
@@ -966,6 +966,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
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, "Custom Transparency", pfUI_config.tooltip, "alpha")
|
||||
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")
|
||||
|
||||
|
||||
+17
-16
@@ -60,25 +60,26 @@ pfUI:RegisterModule("skin", function ()
|
||||
end
|
||||
end
|
||||
|
||||
pfUI.api:CreateBackdrop(ShoppingTooltip1)
|
||||
pfUI.api:CreateBackdrop(ShoppingTooltip2)
|
||||
pfUI.api:CreateBackdrop(ItemRefTooltip)
|
||||
local alpha = tonumber(pfUI_config.tooltip.alpha)
|
||||
pfUI.api:CreateBackdrop(ShoppingTooltip1, nil, nil, alpha)
|
||||
pfUI.api:CreateBackdrop(ShoppingTooltip2, nil, nil, alpha)
|
||||
pfUI.api:CreateBackdrop(ItemRefTooltip, nil, nil, alpha)
|
||||
|
||||
ShoppingTooltip1:SetScript("OnShow", function()
|
||||
local a, b, c, d, e = this:GetPoint()
|
||||
local border = tonumber(pfUI_config.appearance.border.default)
|
||||
if d and d == 0 then d = (border*2)+d+1 end
|
||||
this:SetPoint(a, b, c, d, e)
|
||||
end)
|
||||
ShoppingTooltip1:SetScript("OnShow", function()
|
||||
local a, b, c, d, e = this:GetPoint()
|
||||
local border = tonumber(pfUI_config.appearance.border.default)
|
||||
if d and d == 0 then d = (border*2)+d+1 end
|
||||
this:SetPoint(a, b, c, d, e)
|
||||
end)
|
||||
|
||||
ShoppingTooltip2:SetScript("OnShow", function()
|
||||
local a, b, c, d, e = this:GetPoint()
|
||||
local border = tonumber(pfUI_config.appearance.border.default)
|
||||
if not d or d == 0 then d = (border*2)+d+1 end
|
||||
this:SetPoint(a, b, c, d, e)
|
||||
end)
|
||||
ShoppingTooltip2:SetScript("OnShow", function()
|
||||
local a, b, c, d, e = this:GetPoint()
|
||||
local border = tonumber(pfUI_config.appearance.border.default)
|
||||
if not d or d == 0 then d = (border*2)+d+1 end
|
||||
this:SetPoint(a, b, c, d, e)
|
||||
end)
|
||||
|
||||
pfUI.api:CreateBackdrop(TicketStatusFrame)
|
||||
pfUI.api:CreateBackdrop(TicketStatusFrame)
|
||||
TicketStatusFrame:ClearAllPoints()
|
||||
TicketStatusFrame:SetPoint("TOP", 0, -5)
|
||||
function TicketStatusFrame_OnEvent()
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
pfUI:RegisterModule("tooltip", function ()
|
||||
pfUI.api:CreateBackdrop(GameTooltip)
|
||||
local alpha = tonumber(pfUI_config.tooltip.alpha)
|
||||
pfUI.api:CreateBackdrop(GameTooltip, nil, nil, alpha)
|
||||
|
||||
if pfUI_config.tooltip.position == "cursor" then
|
||||
function GameTooltip_SetDefaultAnchor(tooltip, parent)
|
||||
|
||||
Reference in New Issue
Block a user