mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 21:20:00 +00:00
nameplates: add option to set inactive alpha
This commit is contained in:
@@ -1010,6 +1010,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("nameplates", nil, "targethighlight", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "targetglow", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "targetzoom", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "notargalpha", ".75")
|
||||
|
||||
pfUI:UpdateConfig("abuttons", nil, "enable", "0")
|
||||
pfUI:UpdateConfig("abuttons", nil, "position", "bottom")
|
||||
|
||||
@@ -1928,6 +1928,7 @@ pfUI:RegisterModule("gui", 20400, function ()
|
||||
CreateConfig(nil, T["Highlight Target Nameplate"], C.nameplates, "targethighlight", "checkbox")
|
||||
CreateConfig(nil, T["Draw Glow Around Target Nameplate"], C.nameplates, "targetglow", "checkbox")
|
||||
CreateConfig(nil, T["Zoom Target Nameplate"], C.nameplates, "targetzoom", "checkbox")
|
||||
CreateConfig(nil, T["Inactive Nameplate Alpha"], C.nameplates, "notargalpha")
|
||||
end)
|
||||
|
||||
CreateGUIEntry(T["Thirdparty"], T["Integrations"], function()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
pfUI:RegisterModule("nameplates", 20400, function ()
|
||||
local font = C.nameplates.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default
|
||||
local font_size = C.nameplates.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size
|
||||
local inactive_alpha = tonumber(C.nameplates.notargalpha)
|
||||
|
||||
pfUI.nameplates = CreateFrame("Frame", nil, UIParent)
|
||||
|
||||
@@ -341,6 +342,9 @@ pfUI:RegisterModule("nameplates", 20400, function ()
|
||||
function pfUI.nameplates:OnUpdate()
|
||||
if not this.setup then pfUI.nameplates:OnShow() return end
|
||||
|
||||
-- set nameplate alpha
|
||||
if this:GetAlpha() < inactive_alpha then this:SetAlpha(inactive_alpha) end
|
||||
|
||||
local healthbar = this.healthbar
|
||||
local border, glow, name, level, levelicon , raidicon, combopoints = this.border, this.glow, this.name, this.level, this.levelicon , this.raidicon, this.combopoints
|
||||
local unitname = name:GetText()
|
||||
|
||||
Reference in New Issue
Block a user