Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-30-23, 06:53 PM   #1
scottingram
A Murloc Raider
Join Date: Aug 2023
Posts: 7
SecureHandlerClickTemplate vs SecureActionButtonTemplate

My addon lets you create and put custom flyouts on your action bars.

The "main" button that sits on the action bar and opens/closes the flyout uses
̶S̶e̶c̶u̶r̶e̶A̶c̶t̶i̶o̶n̶B̶u̶t̶t̶o̶n̶T̶e̶m̶p̶l̶a̶t̶e̶ [EDIT] SecureHandlerClickTemplate with its SetFrameRef("flyoutRef", theFlyoutFrame) and flyoutRef:Show() / Hide()

The buttons on the flyout all use SecureActionButtonTemplate to cast the spells, summon pets, consume items, etc. via SetAttribute("type", "spell") etc etc.

My question: Can I get my "main" button to cast a spell, summon a pet, do any of the Restricted actions available to SecureActionButtonTemplate. (Goal: a right click on the "main" button will perform the action of the first of the flyout buttons).

I tried SetFrameRef("btn1", theFirstButton) but it's been pruned of its Click() method. I've tried mainBtn:SetAttribute("type", "spell") etc but I find that SecureHandlerClickTemplate lacks any of that magic. I've tried CastSpellById() inside the mainBtn:SetAttribute("_onclick", "bunch of lua code") but the Restricted Env does not provide that method.

Help please :-)

Last edited by scottingram : 08-30-23 at 10:40 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » SecureHandlerClickTemplate vs 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