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
Isso
AddOnSkins
Commits
c9bb4d18
Commit
c9bb4d18
authored
Oct 31, 2019
by
Slofu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored, backdrop fix
parent
c7298935
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
25 deletions
+36
-25
.gitignore
.gitignore
+1
-0
Skins/AddOns/FlyPlateBuffs.lua
Skins/AddOns/FlyPlateBuffs.lua
+35
-25
No files found.
.gitignore
View file @
c9bb4d18
...
...
@@ -2,3 +2,4 @@ Thumbs.db
Desktop.ini
*.ps1
.pkgmeta
.vs/
\ No newline at end of file
Skins/AddOns/FlyPlateBuffs.lua
View file @
c9bb4d18
...
...
@@ -3,30 +3,40 @@ local AS = unpack(AddOnSkins)
if
not
AS
:
CheckAddOn
(
'FlyPlateBuffs'
)
then
return
end
function
AS
:
FPB
()
local
C_NamePlate_GetNamePlateForUnit
=
C_NamePlate
.
GetNamePlateForUnit
local
function
skinIconButton
(
Button
)
AS
:
SkinTexture
(
Button
.
texture
)
end
local
function
getIconsFromFrame
(
frame
)
if
not
frame
then
return
end
if
not
frame
.
fPBiconsFrame
then
return
end
if
not
frame
.
fPBiconsFrame
.
iconsFrame
then
return
end
for
i
=
1
,
#
frame
.
fPBiconsFrame
.
iconsFrame
do
if
not
frame
.
fPBiconsFrame
.
iconsFrame
[
i
]
then
return
end
skinIconButton
(
frame
.
fPBiconsFrame
.
iconsFrame
[
i
])
end
end
local
testframe
=
CreateFrame
(
"Frame"
)
testframe
:
RegisterEvent
(
"UNIT_AURA"
)
testframe
:
SetScript
(
"OnEvent"
,
function
(
self
,
event
,
...
)
if
event
==
"UNIT_AURA"
then
if
strmatch
((
...
),
"nameplate%d+"
)
then
getIconsFromFrame
(
C_NamePlate_GetNamePlateForUnit
(
...
))
end
end
end
)
local
C_NamePlate_GetNamePlateForUnit
=
C_NamePlate
.
GetNamePlateForUnit
local
function
skinNameplateButton
(
Button
)
--remove fPB stuff
Button
.
durationBg
:
SetTexture
(
''
)
Button
.
border
:
SetTexture
(
''
)
--texture
AS
:
SkinTexture
(
Button
.
texture
)
Button
.
texture
:
SetInside
(
Button
,
0
,
0
)
AS
:
CreateBackdrop
(
Button
)
end
local
function
getButtonsFromNameplate
(
nameplate
)
if
not
nameplate
then
return
end
if
not
nameplate
.
fPBiconsFrame
then
return
end
if
not
nameplate
.
fPBiconsFrame
.
iconsFrame
then
return
end
for
i
=
1
,
#
nameplate
.
fPBiconsFrame
.
iconsFrame
do
if
not
nameplate
.
fPBiconsFrame
.
iconsFrame
[
i
]
then
return
end
skinNameplateButton
(
nameplate
.
fPBiconsFrame
.
iconsFrame
[
i
])
end
end
local
testframe
=
CreateFrame
(
"Frame"
)
testframe
:
RegisterEvent
(
"UNIT_AURA"
)
testframe
:
SetScript
(
"OnEvent"
,
function
(
self
,
event
,
...
)
if
event
==
"UNIT_AURA"
then
if
strmatch
((
...
),
"nameplate%d+"
)
then
getButtonsFromNameplate
(
C_NamePlate_GetNamePlateForUnit
(
...
))
end
end
end
)
end
AS
:
RegisterSkin
(
'FlyPlateBuffs'
,
AS
.
FPB
)
\ No newline at end of file
AS
:
RegisterSkin
(
'FlyPlateBuffs'
,
AS
.
FPB
)
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