Posted by KaKaMoNsTeR on Wed, 13 Jan 2010 18:22:08
What im looking to do is to make a addon that displays a button in the middel of the screen that has Hearthstone in it and if Hearthstone is on cooldown display Teleport: Moonglade, you should be able to press the button to cast Hearthstone/Teleport: Moonglade
i have no experience to do this so if someone could point me in the right direction or help me with the base code ill be greatfull.
Posted by jnwhiteh on Wed, 13 Jan 2010 19:42:54
Out of combat, this should be fairly easy to do. For example:
/run CreateFrame("Button", "HearthFrame", UIParent, "SecureActionButtonTemplate") /run HearthFrame:SetSize(100, 100) /run HearthFrame:SetTexture("Interface/Icons/INV_Misc_Rune_01") /run HearthFrame:SetPoint("CENTER", 0, 0) /run HearthFrame:SetAttribute("type", "spell") /run HearthFrame:SetAttribute("spell", "Hearthstone")
Untested, but may give you an idea.
Posted by KaKaMoNsTeR on Fri, 15 Jan 2010 11:24:30