-
-
Notifications
You must be signed in to change notification settings - Fork 318
Protected Frames
"Clickable" actually comes in 2 flavours. Secure and not secure, depending on whether you want to use a protected function or not. Secure clickable Auras are (almost) always dangerous and should not be used. Non-secure can be used quite safely in most cases. Unfortunately you probably want a secure button so the bad news is that WA can't help you.
Details: a) If you want to fire a secure action - a spell, item, macro, or working as a UnitFrame - then you need to use a SecureActionButtonTemplate. Linking this button to your Aura (even just using SetPoint to anchor it) forces the Aura to become Protected at which point editing or altering it while in combat will cause issues. WA's purpose is to update constantly in combat so using an Aura as a platform for a secure button makes it almost impossible to avoid issues. ○ https://wow.gamepedia.com/Secure_Execution_and_Tainting ○ https://wow.gamepedia.com/SecureActionButtonTemplate
b) If you do not want to fire a secure action then you can use SetScript and have the Aura respond directly to the event handlers OnMouseUp/OnMouseDown. Or you can add a non-secure Button frame to your Aura to handle Click events. Examples of non-protected code you might want to run would be triggering functions in other addons, sending messages to chat, firing "ScanEvents" within WA, etc. ○ https://wow.gamepedia.com/API_ScriptObject_SetScript ○ https://wow.gamepedia.com/Widget_handlers#Frame
• An important note on "Clones" - In WA, Clone regions (created by "TSU" custom triggers or regular triggers that have "auto-clone" settings) are recycled and used again by other cloning Auras. Both secure and non-secure "clickable" approaches involve editing or attaching to the Aura's region and if used with a clone the clickable frame will end up being spread to unrelated Auras and make a mess of your UI.
- Home
- API Documentation
- Getting Involved
- Setting up a Lua Dev Environment
- Deprecations
- Useful Snippets
- Aura Types
- Trigger Types
- Triggers and Untriggers
- Aura Activation
- Dynamic Information
- Text Replacements