This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
0
Hello addon developers! Sorry if I'm writing in the wrong place.
I want to create a button that would track the buff on me. And when a button appears, I would press it and use a spell.
For this, I decided to use the addon Weakauras 2. This addon can track buffs, it remains only to write the code for the button.
The button only responds to a mouse left click. Please tell me what needs to be added to the code so that my button responds to the "1" key.Thanks!
My code
-- Creating buttonlocal captor = CreateFrame("Button", nil, aura_env.region, "SecureActionButtonTemplate")-- Setting positionpoint, relativeTo, relativePoint, xOfs, yOfs = aura_env.region:GetPoint()captor:SetPoint(point, relativeTo, relativePoint, xOfs, yOfs)captor:SetWidth(aura_env.region:GetWidth())captor:SetHeight(aura_env.region:GetHeight())captor:SetAttribute("type", "spell");captor:SetAttribute("spell", "Spellname");
0
Hello addon developers! Sorry if I'm writing in the wrong place.
I want to create a button that would track the buff on me. And when a button appears, I would press it and use a spell.
For this, I decided to use the addon Weakauras 2. This addon can track buffs, it remains only to write the code for the button.
The button only responds to a mouse left click.
Please tell me what needs to be added to the code so that my button responds to the "1" key.
Thanks!
My code