Hello,
I'd like to understand why a simple macro called "Marker"
/run SetRaidTarget("target", 8)
put the skull on nameplate target if macro is on action Bar
with a "SecureActionButtonTemplate"
button:SetAttribute("type","macro")
button:SetAttribute("macro","Marker")
the skull is on target frame and never on nameplate either in/out combat
Code:
local button = CreateFrame("Button","TargetMArker", UIParent, "SecureActionButtonTemplate")
button:ClearAllPoints()
button:SetSize(40, 40)
button:SetPoint("TOP",0,-50) -- button:SetPoint(point, ofsx, ofsy)
button:EnableMouse(true)
button:SetMovable(true)
button:RegisterForClicks("LeftButtonUp","RightButtonUp")
button:RegisterForDrag("LeftButton")
button:SetScript("OnDragStart", button.StartMoving)
button:SetScript("OnDragStop", button.StopMovingOrSizing)
button.texture = button:CreateTexture("ARTWORK") -- create the icon texture
button.texture:SetPoint('TOPRIGHT', button, -2, -2)
button.texture:SetPoint('BOTTOMLEFT', button, 2, 2)
button.texture:SetTexCoord(0.07, 0.93, 0.07, 0.93) -- cut off the blizzard border
button.texture:SetTexture("INTERFACE/TARGETINGFRAME/UI-RaidTargetingIcon_8")
button:SetAttribute("type","macro")
button:SetAttribute("macro","Marker")