I did a mage/warlock gui whit round buttons and used secure this is a fragment from it that might be to some help.
local function CreateSheepButton()
local SheepBtn = CreateFrame("Button", "SheepBtn", MainFrame, "SecureActionButtonTemplate")
SheepBtn:SetWidth(64)
SheepBtn:SetHeight(64)
SheepBtn:SetPoint("CENTER", MainFrame, "CENTER", 0, MainFrame:GetHeight()/2)
SheepBtn:SetAttribute("type", "spell");
SheepBtn:SetAttribute("spell","Polymorph(Rank 1)");
SheepBtn:SetNormalTexture("Interface\\Addons\\Mage\\SpellIcons\\SheepNormal")
SheepBtn:SetHighlightTexture("Interface\\Addons\\Mage\\SpellIcons\\SheepHighlight")
SheepBtn:SetPushedTexture("Interface\\Addons\\Mage\\SpellIcons\\SheepPushed")
SheepBtn:SetScale(0.6)
SheepBtn:RegisterForClicks("LeftButtonUp", "RightButtonUp")
SheepBtn:SetScript("OnEnter",
function()
GameTooltip:SetOwner(this, "ANCHOR_LEFT");
GameTooltip:AddLine("Just make him a Sheep");
GameTooltip:Show();
end)
SheepBtn:SetScript("OnLeave", function() GameTooltip:Hide() end)
return SheepBtn;
end;
__________________
___________________________
If it ain't broken don't break it
|