Thread Tools Display Modes
06-16-14, 03:54 AM   #1
htordeux
A Murloc Raider
Join Date: Apr 2007
Posts: 5
SetRaidTarget macro on SecureActionButtonTemplate

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")

Last edited by htordeux : 06-16-14 at 10:22 AM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » SetRaidTarget macro on SecureActionButtonTemplate


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off