nameplates: add option to set target zoom factor

This commit is contained in:
shagu
2020-07-12 11:07:35 +02:00
parent cd76ac0b72
commit bc8f05f843
3 changed files with 6 additions and 3 deletions
+1
View File
@@ -656,6 +656,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "targetglow", "1")
pfUI:UpdateConfig("nameplates", nil, "glowcolor", "1,1,1,1")
pfUI:UpdateConfig("nameplates", nil, "targetzoom", "0")
pfUI:UpdateConfig("nameplates", nil, "targetzoomval", ".40")
pfUI:UpdateConfig("nameplates", nil, "notargalpha", ".75")
pfUI:UpdateConfig("nameplates", nil, "healthtexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("nameplates", "name", "fontstyle", "OUTLINE")
+2 -1
View File
@@ -2084,11 +2084,12 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateGUIEntry(T["Nameplates"], nil, function()
CreateConfig(U["nameplates"], T["Show On Hostile Units"], C.nameplates, "showhostile", "checkbox")
CreateConfig(U["nameplates"], T["Show On Friendly Units"], C.nameplates, "showfriendly", "checkbox")
CreateConfig(U["nameplates"], T["Inactive Nameplate Alpha"], C.nameplates, "notargalpha", "dropdown", pfUI.gui.dropdowns.percent_small)
CreateConfig(U["nameplates"], T["Draw Border Around Target Nameplate"], C.nameplates, "targethighlight", "checkbox")
CreateConfig(U["nameplates"], T["Draw Glow Around Target Nameplate"], C.nameplates, "targetglow", "checkbox")
CreateConfig(U["nameplates"], T["Glow Color Around Target Nameplate"], C.nameplates, "glowcolor", "color")
CreateConfig(U["nameplates"], T["Zoom Target Nameplate"], C.nameplates, "targetzoom", "checkbox")
CreateConfig(U["nameplates"], T["Inactive Nameplate Alpha"], C.nameplates, "notargalpha", "dropdown", pfUI.gui.dropdowns.percent_small)
CreateConfig(U["nameplates"], T["Target Nameplate Zoom Factor"], C.nameplates, "targetzoomval", "dropdown", pfUI.gui.dropdowns.percent_small)
CreateConfig(U["nameplates"], T["Nameplate Width"], C.nameplates, "width")
CreateConfig(U["nameplates"], T["Enable Class Colors On Enemies"], C.nameplates, "enemyclassc", "checkbox")
CreateConfig(U["nameplates"], T["Enable Class Colors On Friends"], C.nameplates, "friendclassc", "checkbox")
+3 -2
View File
@@ -667,8 +667,9 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
-- target zoom
local w, h = nameplate.health:GetWidth(), nameplate.health:GetHeight()
if target and C.nameplates.targetzoom == "1" then
local wc = tonumber(C.nameplates.width)*1.4
local hc = tonumber(C.nameplates.heighthealth)*1.3
local zoomval = tonumber(C.nameplates.targetzoomval)+1
local wc = tonumber(C.nameplates.width)*zoomval
local hc = tonumber(C.nameplates.heighthealth)*(zoomval*.9)
local animation = false
if wc >= w then