Add new code snippets
This commit is contained in:
17
WA snippets/New Texture and Anchor.lua
Normal file
17
WA snippets/New Texture and Anchor.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
--INIT
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region:SetHeight(128)
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.texture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura51")
|
||||
aura_env.region.texture:SetHeight(128)
|
||||
aura_env.region.texture:SetWidth(128)
|
||||
aura_env.region.texture:SetAllPoints(aura_env.region)
|
||||
aura_env.region.texture:Show()
|
||||
local plate = C_NamePlate.GetNamePlateForUnit("target")
|
||||
if plate then
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0)
|
||||
end
|
||||
Reference in New Issue
Block a user