nameplates: add option to define raidicon position

This commit is contained in:
shagu
2021-01-03 15:18:44 +01:00
parent 17c1933aa7
commit 1eaea3df1a
3 changed files with 11 additions and 4 deletions
+3 -1
View File
@@ -644,7 +644,9 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "enemyclassc", "1")
pfUI:UpdateConfig("nameplates", nil, "friendclassc", "1")
pfUI:UpdateConfig("nameplates", nil, "raidiconsize", "16")
pfUI:UpdateConfig("nameplates", nil, "raidiconpos", "CENTER")
pfUI:UpdateConfig("nameplates", nil, "raidiconoffx", "0")
pfUI:UpdateConfig("nameplates", nil, "raidiconoffy", "-5")
pfUI:UpdateConfig("nameplates", nil, "fullhealth", "1")
pfUI:UpdateConfig("nameplates", nil, "target", "1")
+6 -1
View File
@@ -2117,7 +2117,6 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
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")
CreateConfig(U["nameplates"], T["Enable Combo Point Display"], C.nameplates, "cpdisplay", "checkbox")
CreateConfig(U["nameplates"], T["Raid Icon Size"], C.nameplates, "raidiconsize")
CreateConfig(U["nameplates"], T["Enable Clickthrough"], C.nameplates, "clickthrough", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(U["nameplates"], T["Enable Overlap"], C.nameplates, "overlap", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(U["nameplates"], T["Enable Mouselook With Right Click"], C.nameplates, "rightclick", "checkbox", nil, nil, nil, nil, "vanilla")
@@ -2126,6 +2125,12 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(U["nameplates"], T["Font Style"], C.nameplates.name, "fontstyle", "dropdown", pfUI.gui.dropdowns.fontstyle)
CreateConfig(U["nameplates"], T["Replace Totems With Icons"], C.nameplates, "totemicons", "checkbox")
CreateConfig(nil, T["Raid Icon"], nil, nil, "header")
CreateConfig(U["nameplates"], T["Raid Icon Position"], C.nameplates, "raidiconpos", "dropdown", pfUI.gui.dropdowns.positions)
CreateConfig(U["nameplates"], T["Raid Icon X-Offset"], C.nameplates, "raidiconoffx")
CreateConfig(U["nameplates"], T["Raid Icon Y-Offset"], C.nameplates, "raidiconoffy")
CreateConfig(U["nameplates"], T["Raid Icon Size"], C.nameplates, "raidiconsize")
CreateConfig(nil, T["Castbar"], nil, nil, "header")
CreateConfig(U["nameplates"], T["Enable Castbars"], C.nameplates, "showcastbar", "checkbox")
CreateConfig(U["nameplates"], T["Enable Spellname"], C.nameplates, "spellname", "checkbox")
+2 -2
View File
@@ -254,8 +254,6 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
nameplate.level:SetPoint("RIGHT", nameplate.health, "LEFT", -3, 0)
nameplate.raidicon:SetParent(nameplate.health)
nameplate.raidicon:ClearAllPoints()
nameplate.raidicon:SetPoint("CENTER", nameplate.health, "CENTER", 0, -5)
nameplate.raidicon:SetDrawLayer("OVERLAY")
nameplate.raidicon:SetTexture(pfUI.media["img:raidicons"])
@@ -401,6 +399,8 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
nameplate.glow:SetHeight(C.nameplates.heighthealth + 30)
nameplate.glow:SetVertexColor(glowr, glowg, glowb, glowa)
nameplate.raidicon:ClearAllPoints()
nameplate.raidicon:SetPoint(C.nameplates.raidiconpos, nameplate.health, C.nameplates.raidiconpos, C.nameplates.raidiconoffx, C.nameplates.raidiconoffy)
nameplate.level:SetFont(font, font_size, font_style)
nameplate.raidicon:SetWidth(C.nameplates.raidiconsize)
nameplate.raidicon:SetHeight(C.nameplates.raidiconsize)