Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hekili
ElvUI
Commits
d53baaf6
Commit
d53baaf6
authored
Jun 04, 2019
by
Azilroka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert this stuff.. Keep it in the profiles.
parent
aa673f30
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
57 deletions
+95
-57
ElvUI/Core/Core.lua
ElvUI/Core/Core.lua
+23
-0
ElvUI/Modules/Nameplates/Elements/Plugins.lua
ElvUI/Modules/Nameplates/Elements/Plugins.lua
+4
-6
ElvUI/Modules/Nameplates/Nameplates.lua
ElvUI/Modules/Nameplates/Nameplates.lua
+19
-12
ElvUI/Settings/Profile.lua
ElvUI/Settings/Profile.lua
+19
-0
ElvUI_OptionsUI/Nameplates.lua
ElvUI_OptionsUI/Nameplates.lua
+30
-39
No files found.
ElvUI/Core/Core.lua
View file @
d53baaf6
...
...
@@ -1780,6 +1780,29 @@ function E:DBConversions()
if
E
.
global
.
uiScaleInformed
then
E
.
global
.
uiScaleInformed
=
nil
end
if
E
.
global
.
nameplatesResetInformed
then
E
.
global
.
nameplatesResetInformed
=
nil
end
if
E
.
global
.
userInformedNewChanges1
then
E
.
global
.
userInformedNewChanges1
=
nil
end
-- cvar nameplate visibility stuff
if
E
.
db
.
nameplates
.
visibility
.
nameplateShowAll
~=
nil
then
E
.
db
.
nameplates
.
visibility
.
showAll
=
E
.
db
.
nameplates
.
visibility
.
nameplateShowAll
E
.
db
.
nameplates
.
visibility
.
nameplateShowAll
=
nil
end
if
E
.
db
.
nameplates
.
units
.
FRIENDLY_NPC
.
showAlways
~=
nil
then
E
.
db
.
nameplates
.
visibility
.
friendly
.
npcs
=
E
.
db
.
nameplates
.
units
.
FRIENDLY_NPC
.
showAlways
E
.
db
.
nameplates
.
units
.
FRIENDLY_NPC
.
showAlways
=
nil
end
if
E
.
db
.
nameplates
.
units
.
FRIENDLY_PLAYER
.
minions
~=
nil
then
E
.
db
.
nameplates
.
visibility
.
friendly
.
minions
=
E
.
db
.
nameplates
.
units
.
FRIENDLY_PLAYER
.
minions
E
.
db
.
nameplates
.
units
.
FRIENDLY_PLAYER
.
minions
=
nil
end
if
E
.
db
.
nameplates
.
units
.
ENEMY_NPC
.
minors
~=
nil
then
E
.
db
.
nameplates
.
visibility
.
enemy
.
minus
=
E
.
db
.
nameplates
.
units
.
ENEMY_NPC
.
minors
E
.
db
.
nameplates
.
units
.
ENEMY_NPC
.
minors
=
nil
end
if
E
.
db
.
nameplates
.
units
.
ENEMY_PLAYER
.
minions
~=
nil
or
E
.
db
.
nameplates
.
units
.
ENEMY_NPC
.
minions
~=
nil
then
E
.
db
.
nameplates
.
visibility
.
enemy
.
minions
=
E
.
db
.
nameplates
.
units
.
ENEMY_PLAYER
.
minions
or
E
.
db
.
nameplates
.
units
.
ENEMY_NPC
.
minions
E
.
db
.
nameplates
.
units
.
ENEMY_PLAYER
.
minions
=
nil
E
.
db
.
nameplates
.
units
.
ENEMY_NPC
.
minions
=
nil
end
end
local
CPU_USAGE
=
{}
...
...
ElvUI/Modules/Nameplates/Elements/Plugins.lua
View file @
d53baaf6
...
...
@@ -4,8 +4,6 @@ local NP = E:GetModule('NamePlates')
local
_G
=
_G
local
pairs
,
unpack
=
pairs
,
unpack
local
CreateFrame
=
CreateFrame
local
GetCVar
=
GetCVar
local
GetCVarBool
=
GetCVarBool
function
NP
:
Construct_QuestIcons
(
nameplate
)
local
QuestIcons
=
CreateFrame
(
'Frame'
,
nameplate
:
GetDebugName
()
..
'QuestIcons'
,
nameplate
)
...
...
@@ -218,7 +216,7 @@ end
function
NP
:
Update_Fader
(
nameplate
)
local
db
=
NP
.
db
.
units
[
nameplate
.
frameType
]
if
(
n
ameplate
.
frameType
~=
'PLAYER'
)
or
nameplate
.
frameType
==
'PLAYER'
and
GetCVarBool
(
'NameplatePersonalS
howAlways
'
)
then
if
(
n
ot
db
.
visibility
)
or
db
.
visibility
.
s
howAlways
then
if
nameplate
:
IsElementEnabled
(
'Fader'
)
then
nameplate
:
DisableElement
(
'Fader'
)
...
...
@@ -240,9 +238,9 @@ function NP:Update_Fader(nameplate)
nameplate
.
Fader
:
SetOption
(
'Casting'
,
true
)
end
nameplate
.
Fader
:
SetOption
(
'PlayerTarget'
,
GetCVarBool
(
'NameplatePersonalS
howWithTarget
'
)
)
nameplate
.
Fader
:
SetOption
(
'Combat'
,
GetCVarBool
(
'NameplatePersonalS
howInCombat
'
)
)
nameplate
.
Fader
:
SetOption
(
'Delay'
,
GetCVar
(
'NameplatePersonalH
ideDelay
Alpha'
)
)
nameplate
.
Fader
:
SetOption
(
'PlayerTarget'
,
db
.
visibility
.
s
howWithTarget
)
nameplate
.
Fader
:
SetOption
(
'Combat'
,
db
.
visibility
.
s
howInCombat
)
nameplate
.
Fader
:
SetOption
(
'Delay'
,
db
.
visibility
.
h
ideDelay
)
nameplate
.
Fader
:
ForceUpdate
()
end
...
...
ElvUI/Modules/Nameplates/Nameplates.lua
View file @
d53baaf6
...
...
@@ -15,7 +15,6 @@ local hooksecurefunc = hooksecurefunc
local
CreateFrame
=
CreateFrame
local
GetCVar
=
GetCVar
local
GetCVarDefault
=
GetCVarDefault
local
GetCVarBool
=
GetCVarBool
local
GetInstanceInfo
=
GetInstanceInfo
local
GetNumGroupMembers
=
GetNumGroupMembers
local
GetNumSubgroupMembers
=
GetNumSubgroupMembers
...
...
@@ -107,19 +106,27 @@ function NP:SetCVars()
SetCVar
(
'nameplateOtherBottomInset'
,
-
1
)
end
SetCVar
(
'nameplateMaxDistance'
,
NP
.
db
.
loadDistance
)
SetCVar
(
'nameplateMotion'
,
NP
.
db
.
motionType
==
'STACKED'
and
1
or
0
)
SetCVar
(
'NameplatePersonalShowAlways'
,
NP
.
db
.
units
.
PLAYER
.
visibility
.
showAlways
and
1
or
0
)
SetCVar
(
'NameplatePersonalShowInCombat'
,
NP
.
db
.
units
.
PLAYER
.
visibility
.
showInCombat
and
1
or
0
)
SetCVar
(
'NameplatePersonalShowWithTarget'
,
NP
.
db
.
units
.
PLAYER
.
visibility
.
showWithTarget
and
1
or
0
)
SetCVar
(
'NameplatePersonalHideDelayAlpha'
,
NP
.
db
.
units
.
PLAYER
.
visibility
.
hideDelay
)
-- the order of these is important !!
SetCVar
(
'nameplateShowAll'
,
GetCVar
(
'nameplateShowAll'
)
)
SetCVar
(
'nameplateShowAll'
,
NP
.
db
.
visibility
.
showAll
and
1
or
0
)
SetCVar
(
'nameplateShowSelf'
,
(
NP
.
db
.
units
.
PLAYER
.
useStaticPosition
or
not
NP
.
db
.
units
.
PLAYER
.
enable
)
and
0
or
1
)
SetCVar
(
'nameplateShowEnemyMinions'
,
GetCVar
(
'nameplateShowE
nemy
M
inions
'
)
)
SetCVar
(
'nameplateShowEnemyGuardians'
,
GetCVar
(
'nameplateShowE
nemy
G
uardians
'
)
)
SetCVar
(
'nameplateShowEnemyMinus'
,
GetCVar
(
'nameplateShowE
nemy
M
inus
'
)
)
SetCVar
(
'nameplateShowEnemyPets'
,
GetCVar
(
'nameplateShowE
nemy
P
ets
'
)
)
SetCVar
(
'nameplateShowEnemyTotems'
,
GetCVar
(
'nameplateShowE
nemy
T
otems
'
)
)
SetCVar
(
'nameplateShowFriendlyMinions'
,
GetCVar
(
'nameplateShowF
riendly
M
inions
'
)
)
SetCVar
(
'nameplateShowFriendlyGuardians'
,
GetCVar
(
'nameplateShowF
riendly
G
uardians
'
)
)
SetCVar
(
'nameplateShowFriendlyNPCs'
,
GetCVar
(
'nameplateShowFriendlyNPCs'
)
)
SetCVar
(
'nameplateShowFriendlyPets'
,
GetCVar
(
'nameplateShowF
riendly
P
ets
'
)
)
SetCVar
(
'nameplateShowFriendlyTotems'
,
GetCVar
(
'nameplateShowF
riendly
T
otems
'
)
)
SetCVar
(
'nameplateShowEnemyMinions'
,
NP
.
db
.
visibility
.
e
nemy
.
m
inions
and
1
or
0
)
SetCVar
(
'nameplateShowEnemyGuardians'
,
NP
.
db
.
visibility
.
e
nemy
.
g
uardians
and
1
or
0
)
SetCVar
(
'nameplateShowEnemyMinus'
,
NP
.
db
.
visibility
.
e
nemy
.
m
inus
and
1
or
0
)
SetCVar
(
'nameplateShowEnemyPets'
,
NP
.
db
.
visibility
.
e
nemy
.
p
ets
and
1
or
0
)
SetCVar
(
'nameplateShowEnemyTotems'
,
NP
.
db
.
visibility
.
e
nemy
.
t
otems
and
1
or
0
)
SetCVar
(
'nameplateShowFriendlyMinions'
,
NP
.
db
.
visibility
.
f
riendly
.
m
inions
and
1
or
0
)
SetCVar
(
'nameplateShowFriendlyGuardians'
,
NP
.
db
.
visibility
.
f
riendly
.
g
uardians
and
1
or
0
)
SetCVar
(
'nameplateShowFriendlyNPCs'
,
NP
.
db
.
visibility
.
friendly
.
npcs
and
1
or
0
)
SetCVar
(
'nameplateShowFriendlyPets'
,
NP
.
db
.
visibility
.
f
riendly
.
p
ets
and
1
or
0
)
SetCVar
(
'nameplateShowFriendlyTotems'
,
NP
.
db
.
visibility
.
f
riendly
.
t
otems
and
1
or
0
)
end
function
NP
:
PLAYER_REGEN_DISABLED
()
...
...
ElvUI/Settings/Profile.lua
View file @
d53baaf6
...
...
@@ -437,7 +437,9 @@ P.nameplates = {
font
=
'PT Sans Narrow'
,
fontOutline
=
'OUTLINE'
,
fontSize
=
11
,
loadDistance
=
40
,
lowHealthThreshold
=
0
.
4
,
motionType
=
'STACKED'
,
nameColoredGlow
=
false
,
showEnemyCombat
=
'DISABLED'
,
showFriendlyCombat
=
'DISABLED'
,
...
...
@@ -452,6 +454,23 @@ P.nameplates = {
useThreatColor
=
true
,
indicator
=
false
,
},
visibility
=
{
showAll
=
true
,
enemy
=
{
guardians
=
false
,
minions
=
false
,
minus
=
true
,
pets
=
false
,
totems
=
false
,
},
friendly
=
{
guardians
=
false
,
minions
=
false
,
npcs
=
true
,
pets
=
false
,
totems
=
false
,
},
},
cutaway
=
{
health
=
{
enabled
=
false
,
...
...
ElvUI_OptionsUI/Nameplates.lua
View file @
d53baaf6
...
...
@@ -19,7 +19,6 @@ local GetSpellInfo = GetSpellInfo
local
GetTalentInfo
=
GetTalentInfo
local
SetCVar
=
SetCVar
local
GetCVar
=
GetCVar
local
GetCVarBool
=
GetCVarBool
local
raidTargetIcon
=
"|TInterface
\\
TargetingFrame
\\
UI-RaidTargetingIcon_%s:0|t %s"
local
selectedNameplateFilter
...
...
@@ -4312,11 +4311,9 @@ E.Options.args.nameplate = {
order = 1,
name = L["
UNIT_NAMEPLATES_TYPES
"],
desc = L["
Set
to
either
stack
nameplates
vertically
or
allow
them
to
overlap
.
"],
get = function() return tonumber(GetCVar('nameplateMotion')) end,
set = function(_, value) SetCVar('nameplateMotion', value) end,
values = {
[
0
] = L["
UNIT_NAMEPLATES_TYPE_
1
"],
[
1
] = L["
UNIT_NAMEPLATES_TYPE_
2
"],
[
'STACKED'
] = L["
UNIT_NAMEPLATES_TYPE_
2
"],
[
'OVERLAP'
] = L["
UNIT_NAMEPLATES_TYPE_
1
"],
},
},
showEnemyCombat = {
...
...
@@ -4359,8 +4356,6 @@ E.Options.args.nameplate = {
name = L["
Load
Distance
"],
desc = L["
Only
load
nameplates
for
units
within
this
range
.
"],
min = 10, max = 100, step = 1,
get = function() return tonumber(GetCVar('nameplateMaxDistance')) end,
set = function(_, value) SetCVar('nameplateMaxDistance', value) end,
},
overlapV = {
order = 7,
...
...
@@ -4437,45 +4432,44 @@ E.Options.args.nameplate = {
customWidth = 250,
name = L["
UNIT_NAMEPLATES_AUTOMODE
"],
desc = L["
This
option
controls
the
Blizzard
setting
for
whether
or
not
the
Nameplates
should
be
shown
.
"],
get = function() return
GetCVarBool('nameplateS
howAll
')
end,
set = function(info, value)
SetCVar('nameplateS
howAll
',
value
== true and 1 or 0
) NP:ConfigureAll() end,
get = function(
info
) return
E.db.nameplates.visibility.s
howAll end,
set = function(info, value)
E.db.nameplates.visibility.s
howAll
=
value
; NP:SetCVars(
) NP:ConfigureAll() end,
},
showAlways = {
order = 1,
type = "
toggle
",
name = L["
Always
Show
Player
"],
get = function(info) return GetCVarBool('NameplatePersonalShowAlways') end,
set = function(_, value) SetCVar('NameplatePersonalShowAlways', value == true and 1 or 0) NP:ConfigureAll() end,
disabled = function() return not E.db.nameplates.units.PLAYER.enable end,
get = function(info) return E.db.nameplates.units.PLAYER.visibility.showAlways end,
set = function(info, value) E.db.nameplates.units.PLAYER.visibility.showAlways = value; NP:SetCVars() NP:ConfigureAll() end,
},
playerVisibility = {
order = 2,
type = "
group
",
guiInline = true,
name = L["
Player
"],
disabled = function() return GetCVarBool('NameplatePersonalShowAlways') end,
get = function(info) return E.db.nameplates.units.PLAYER.visibility[info[#info]] end,
set = function(info, value) E.db.nameplates.units.PLAYER.visibility[info[#info]] = value; NP:SetCVars(); NP:ConfigureAll() end,
args = {
showInCombat = {
order = 2,
type = "
toggle
",
name = L["
Show
In
Combat
"],
get = function(info) return GetCVarBool('NameplatePersonalShowInCombat') end,
set = function(_, value) SetCVar('NameplatePersonalShowInCombat', value == true and 1 or 0) NP:ConfigureAll() end,
disabled = function() return not E.db.nameplates.units.PLAYER.enable or E.db.nameplates.units.PLAYER.visibility.showAlways end,
},
showWithTarget = {
order = 2,
type = "
toggle
",
name = L["
Show
With
Target
"],
desc = L["
When
using
Static
Position
,
this
option
also
requires
the
target
to
be
attackable
.
"],
get = function(info) return GetCVarBool('NameplatePersonalShowWithTarget') end,
set = function(_, value) SetCVar('NameplatePersonalShowWithTarget', value == true and 1 or 0) NP:ConfigureAll() end,
disabled = function() return not E.db.nameplates.units.PLAYER.enable or E.db.nameplates.units.PLAYER.visibility.showAlways end,
},
hideDelay = {
order = 4,
type = "
range
",
name = L["
Hide
Delay
"],
min = 0, max = 20, step = 1,
get = function(info) return tonumber(GetCVar('NameplatePersonalHideDelayAlpha')) end,
set = function(_, value) SetCVar('NameplatePersonalHideDelayAlpha', value) NP:ConfigureAll() end,
disabled = function() return not E.db.nameplates.units.PLAYER.enable or E.db.nameplates.units.PLAYER.visibility.showAlways end,
},
},
},
...
...
@@ -4484,35 +4478,33 @@ E.Options.args.nameplate = {
order = 3,
guiInline = true,
name = L["
Enemy
"],
disabled = function() return not GetCVarBool('nameplateShowAll') end,
get = function(info) return GetCVarBool(info[#info]) end,
set = function(info, value)
SetCVar(info[#info], value == true and 1 or 0)
NP:SetCVars()
NP:ConfigureAll()
end,
disabled = function() return not E.db.nameplates.visibility.showAll end,
get = function(info) return E.db.nameplates.visibility.enemy[info[#info]] end,
set = function(info, value) E.db.nameplates.visibility.enemy[info[#info]] = value;
NP:SetCVars();
NP:ConfigureAll() end,
args = {
nameplateShowEnemyG
uardians = {
g
uardians = {
type = "
toggle
",
order = 1,
name = L["
Guardians
"],
},
nameplateShowEnemyM
inions = {
m
inions = {
type = "
toggle
",
order = 2,
name = L["
Minions
"],
},
nameplateShowEnemyM
inus = {
m
inus = {
type = "
toggle
",
order = 3,
name = L["
Minus
"],
},
nameplateShowEnemyP
ets = {
p
ets = {
type = "
toggle
",
order = 4,
name = L["
Pets
"],
},
nameplateShowEnemyT
otems = {
t
otems = {
type = "
toggle
",
order = 5,
name = L["
Totems
"],
...
...
@@ -4524,35 +4516,34 @@ E.Options.args.nameplate = {
order = 4,
guiInline = true,
name = L["
Friendly
"],
disabled = function() return not GetCVarBool('nameplateShowAll') end,
get = function(info) return GetCVarBool(info[#info]) end,
set = function(info, value)
SetCVar(info[#info], value == true and 1 or 0)
disabled = function() return not E.db.nameplates.visibility.showAll end,
get = function(info) return E.db.nameplates.visibility.friendly[info[#info]] end,
set = function(info, value) E.db.nameplates.visibility.friendly[info[#info]] = value;
NP:SetCVars()
NP:ConfigureAll()
end,
args = {
nameplateShowFriendlyG
uardians = {
g
uardians = {
type = "
toggle
",
order = 1,
name = L["
Guardians
"],
},
nameplateShowFriendlyM
inions = {
m
inions = {
type = "
toggle
",
order = 2,
name = L["
Minions
"],
},
n
ameplateShowFriendlyNPC
s = {
n
pc
s = {
type = "
toggle
",
order = 3,
name = L["
NPC
"],
},
nameplateShowFriendlyP
ets = {
p
ets = {
type = "
toggle
",
order = 4,
name = L["
Pets
"],
},
nameplateShowFriendlyT
otems = {
t
otems = {
type = "
toggle
",
order = 5,
name = L["
Totems
"],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment