Commit e5c141e5 authored by Azilroka's avatar Azilroka

Nameplate Display Styles

parent e13a7248
......@@ -97,7 +97,11 @@ function NP:SetCVars()
SetCVar('nameplateMaxDistance', NP.db.loadDistance)
SetCVar('nameplateMotion', NP.db.motionType == 'STACKED' and 1 or 0)
-- SetCVar('nameplateShowAll', 1) -- NP Show Always
SetCVar('nameplateShowAll', NP.db.visibility.nameplateShowAll and 1 or 0) -- NP Show Always
SetCVar('UnitNameFriendlySpecialNPCName', NP.db.visibility.UnitNameFriendlySpecialNPCName and 1 or 0) -- Quest Only
SetCVar('UnitNameNPC', NP.db.visibility.UnitNameNPC and 1 or 0) -- All NPC Hostile / Friendly
SetCVar('UnitNameHostleNPC', NP.db.visibility.UnitNameHostleNPC and 1 or 0) -- Hositle
SetCVar('UnitNameInteractiveNPC', NP.db.visibility.UnitNameInteractiveNPC and 1 or 0) -- Interactive
SetCVar('NameplatePersonalShowAlways', NP.db.units.PLAYER.visibility.showAlways and 1 or 0)
SetCVar('NameplatePersonalShowInCombat', NP.db.units.PLAYER.visibility.showInCombat and 1 or 0)
......@@ -323,6 +327,8 @@ function NP:DisablePlate(nameplate, nameOnly)
if E.myclass == 'DEATHKNIGHT' and nameplate:IsElementEnabled('Runes') then nameplate:DisableElement('Runes') end
if E.myclass == 'MONK' and nameplate:IsElementEnabled('Stagger') then nameplate:DisableElement('Stagger') end
NP:Update_Tags(nameplate)
nameplate.Health.Text:Hide()
nameplate.Power.Text:Hide()
nameplate.Name:Hide()
......@@ -339,6 +345,8 @@ function NP:DisablePlate(nameplate, nameOnly)
nameplate.Title:ClearAllPoints()
nameplate.Title:SetPoint('TOP', nameplate.Name, 'BOTTOM', 0, -2)
end
else
if nameplate:IsElementEnabled('Highlight') then nameplate:DisableElement('Hightlight') end
end
end
......
......@@ -431,7 +431,6 @@ P.nameplates = {
fontSize = 18,
},
},
displayStyle = 'ALL',
filters = {
ElvUI_Boss = {triggers = {enable = true}},
ElvUI_Target = {triggers = {enable = true}},
......@@ -458,6 +457,13 @@ P.nameplates = {
useThreatColor = true,
indicator = false,
},
visibility = {
nameplateShowAll = true,
UnitNameNPC = true,
UnitNameFriendlySpecialNPCName = true,
UnitNameHostleNPC = false,
UnitNameInteractiveNPC = true,
},
units = {
PLAYER = {
enable = false,
......
......@@ -4255,17 +4255,6 @@ E.Options.args.nameplate = {
['OVERLAP'] = L.UNIT_NAMEPLATES_TYPE_1,
},
},
displayStyle = {
type = "select",
order = 2,
name = L["Display Style"],
desc = L["Controls which nameplates will be displayed."],
values = {
["ALL"] = L.ALL,
["BLIZZARD"] = L["Target, Quest, Combat"],
["TARGET"] = L["Only Show Target"],
},
},
showEnemyCombat = {
order = 3,
type = "select",
......@@ -4365,6 +4354,43 @@ E.Options.args.nameplate = {
},
},
},
visibility = {
order = 16,
type = "group",
guiInline = true,
name = L["Visibility"],
get = function(info) return E.db.nameplates.visibility[info[#info]] end,
set = function(info, value) E.db.nameplates.visibility[info[#info]] = value; NP:SetCVars() NP:ConfigureAll() end,
args = {
nameplateShowAll = {
order = 1,
type = "toggle",
name = L["Always Show NamePlates"],
},
UnitNameNPC = {
order = 2,
type = "toggle",
name = L["All NPCs"],
set = function(info, value) E.db.nameplates.visibility[info[#info]] = value; E.db.nameplates.visibility.UnitNameHostleNPC = false; NP:SetCVars() NP:ConfigureAll() end,
},
UnitNameFriendlySpecialNPCName ={
order = 3,
type = "toggle",
name = L["Quest Objective & NPCs"],
},
UnitNameHostleNPC = {
order = 4,
type = "toggle",
name = L["Hostile NPCs"],
disabled = function() return E.db.nameplates.visibility.UnitNameNPC end,
},
UnitNameInteractiveNPC = {
order = 5,
type = "toggle",
name = L["Interactive NPCs"],
},
},
},
plateSize = {
order = 16,
type = "group",
......@@ -5166,3 +5192,35 @@ for i = 1, 6 do
end,
}
end
E.Options.args.tagGroup = {
order = 925,
type = "group",
name = L["Available Tags"],
args = {}
}
for Tag in next, E.oUF.Tags.Methods do
E.Options.args.tagGroup.args[Tag] = {
type = 'description',
fontSize = 'medium',
name = Tag,
}
end
E.Options.args.EventTrace = {
order = -50,
type = "group",
name = L["Event Trace"],
args = {}
}
local Frame = CreateFrame('Frame')
Frame:RegisterAllEvents()
Frame:SetScript('OnEvent', function(self, event, ...)
E.Options.args.EventTrace.args[event] = {
type = 'description',
fontSize = 'medium',
name = event,
}
end)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment