nameplates: rewrite entire module

* Add additional options to hide specific types
* Use more accurate debuff logic
* Use proper pfUI borders around elements
* Provide instant updates on config change
* Reduce OnUpdate functions on each frame
* Only Refresh plate on value change and events
* Remove unnecessary textures from the plate
* Separate vanilla quirks from the core
* Deprecate "legacy" option
This commit is contained in:
shagu
2020-02-28 15:46:15 +01:00
parent 0252605645
commit f3b01c8602
3 changed files with 675 additions and 704 deletions
+32 -27
View File
@@ -1424,6 +1424,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(nil, T["Panel Border Size"], C.appearance.border, "panels")
CreateConfig(nil, T["Chat Border Size"], C.appearance.border, "chat")
CreateConfig(nil, T["Bags Border Size"], C.appearance.border, "bags")
CreateConfig(U["nameplates"], T["Nameplate Border Size"], C.appearance.border, "nameplates")
CreateConfig(nil) -- spacer
CreateConfig(nil, T["Enable Combat Glow Effects On Screen Edges"], C.appearance.infight, "screen", "checkbox")
end)
@@ -1955,34 +1956,38 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
end)
CreateGUIEntry(T["Nameplates"], nil, function()
CreateConfig(nil, T["Use Unit Fonts"], C.nameplates, "use_unitfonts", "checkbox")
CreateConfig(nil, T["Enable Castbars"], C.nameplates, "showcastbar", "checkbox")
CreateConfig(nil, T["Enable Spellname"], C.nameplates, "spellname", "checkbox")
CreateConfig(nil, T["Enable Debuffs"], C.nameplates, "showdebuffs", "checkbox")
CreateConfig(nil, T["Enable Clickthrough"], C.nameplates, "clickthrough", "checkbox")
CreateConfig(nil, T["Legacy Click Handlers (Breaks Vertical Position and Overlap)"], C.nameplates, "legacy", "checkbox")
CreateConfig(nil, T["Enable Overlap"], C.nameplates, "overlap", "checkbox")
CreateConfig(nil, T["Enable Mouselook With Right Click"], C.nameplates, "rightclick", "checkbox")
CreateConfig(nil, T["Right Click Auto Attack Threshold"], C.nameplates, "clickthreshold")
CreateConfig(nil, T["Enable Class Colors On Enemies"], C.nameplates, "enemyclassc", "checkbox")
CreateConfig(nil, T["Enable Class Colors On Friends"], C.nameplates, "friendclassc", "checkbox")
CreateConfig(nil, T["Raid Icon Size"], C.nameplates, "raidiconsize")
CreateConfig(nil, T["Show Players Only"], C.nameplates, "players", "checkbox")
CreateConfig(nil, T["Hide Critters"], C.nameplates, "critters", "checkbox")
CreateConfig(nil, T["Hide Totems"], C.nameplates, "totems", "checkbox")
CreateConfig(nil, T["Show Health Points"], C.nameplates, "showhp", "checkbox")
CreateConfig(nil, T["Vertical Position"], C.nameplates, "vpos")
CreateConfig(nil, T["Nameplate Width"], C.nameplates, "width")
CreateConfig(nil, T["Healthbar Height"], C.nameplates, "heighthealth")
CreateConfig(nil, T["Castbar Height"], C.nameplates, "heightcast")
CreateConfig(nil, T["Enable Combo Point Display"], C.nameplates, "cpdisplay", "checkbox")
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["Glow Color Around Target Nameplate"], C.nameplates, "glowcolor", "color")
CreateConfig(nil, T["Zoom Target Nameplate"], C.nameplates, "targetzoom", "checkbox")
CreateConfig(nil, T["Inactive Nameplate Alpha"], C.nameplates, "notargalpha")
CreateConfig(nil, T["Healthbar Texture"], C.nameplates, "healthtexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
CreateConfig(U["nameplates"], T["Use Unit Fonts"], C.nameplates, "use_unitfonts", "checkbox")
CreateConfig(U["nameplates"], T["Enable Castbars"], C.nameplates, "showcastbar", "checkbox")
CreateConfig(U["nameplates"], T["Enable Spellname"], C.nameplates, "spellname", "checkbox")
CreateConfig(U["nameplates"], T["Enable Debuffs"], C.nameplates, "showdebuffs", "checkbox")
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["Raid Icon Size"], C.nameplates, "raidiconsize")
CreateConfig(U["nameplates"], T["Always Show Units With Missing HP"], C.nameplates, "fullhealth", "checkbox")
CreateConfig(U["nameplates"], T["Always Show Target Units"], C.nameplates, "target", "checkbox")
CreateConfig(U["nameplates"], T["Hide Enemy NPCs"], C.nameplates, "enemynpc", "checkbox")
CreateConfig(U["nameplates"], T["Hide Enemy Players"], C.nameplates, "enemyplayer", "checkbox")
CreateConfig(U["nameplates"], T["Hide Neutral NPCs"], C.nameplates, "neutralnpc", "checkbox")
CreateConfig(U["nameplates"], T["Hide Friendly NPCs"], C.nameplates, "friendlynpc", "checkbox")
CreateConfig(U["nameplates"], T["Hide Friendly Players"], C.nameplates, "friendlyplayer", "checkbox")
CreateConfig(U["nameplates"], T["Hide Critters"], C.nameplates, "critters", "checkbox")
CreateConfig(U["nameplates"], T["Hide Totems"], C.nameplates, "totems", "checkbox")
CreateConfig(U["nameplates"], T["Show Health Points"], C.nameplates, "showhp", "checkbox")
CreateConfig(U["nameplates"], T["Nameplate Width"], C.nameplates, "width")
CreateConfig(U["nameplates"], T["Healthbar Height"], C.nameplates, "heighthealth")
CreateConfig(U["nameplates"], T["Castbar Height"], C.nameplates, "heightcast")
CreateConfig(U["nameplates"], T["Enable Combo Point Display"], C.nameplates, "cpdisplay", "checkbox")
CreateConfig(U["nameplates"], T["Highlight 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")
CreateConfig(U["nameplates"], T["Healthbar Texture"], C.nameplates, "healthtexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
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")
CreateConfig(U["nameplates"], T["Right Click Auto Attack Threshold"], C.nameplates, "clickthreshold", nil, nil, nil, nil, nil, "vanilla")
end)
CreateGUIEntry(T["Thirdparty"], T["Integrations"], function()