Originally Posted by alikim
I mean how do you do this?
|
this is what I'm using for my profession cds, not sure if it's the right way but it works and doesn't taint
Code:
button:WrapScript(button, "PreClick", [[
if (button == "RightButton") then
-- Hide
self:SetID(0);
self:SetAttribute("userhidden", true);
self:SetAttribute("macrotext", nil);
self:Hide();
-- Update Anchors
self:GetParent():RunAttribute("UpdateChildAnchors");
elseif (button == "MiddleButton") then
-- Toggle Profession
self:SetAttribute("macrotext", self:GetAttribute("macrotext-profession"));
else
-- Create Profession Cooldown Item
self:SetAttribute("macrotext", self:GetAttribute("macrotext-tradeskill"));
end
]]);
btw, why don't you just reskin the original button instead?