background preloader

Wow

Facebook Twitter

Drood. WoW AddOns - WowAce.com. Ace3 - Pages - WoW AddOns - WowAce.com. Ace3 - API/AceAddon-3.0 - WoW AddOns - WowAce.com. AceAddon-3.0 provides a template for creating addon objects. It'll provide you with a set of callback functions that allow you to simplify the loading process of your addon. Callbacks provided are: OnInitialize, which is called directly after the addon is fully loaded. OnEnable which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present.

Example addon:Disable() Disables the Addon, if possible, return true or false depending on success. Usage -- Disable MyAddonMyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")MyAddon:Disable() addon:DisableModule(name) Disables the Module, if possible, return true or false depending on success. -- Disable MyModule using :GetModuleMyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")MyModule = MyAddon:GetModule("MyModule")MyModule:Disable() -- Disable MyModule using the short-handMyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")MyAddon:DisableModule("MyModule") addon:Enable() addon:EnableModule(name) name.

World of Warcraft API. SecureActionButtonTemplate. The SecureActionButtonTemplate was introduced in Patch 2.0 to allow addons to perform protected actions -- casting spells, executing macros, etc -- by specifying button behavior via its attributes. Edit To create a SecureActionButton, simply create a button that inherits from the SecureActionButtonTemplate; to make the button instance useful, specify interesting attributes. This can be done in both XML, Lua and a mix of the two: Using XML: Using Lua: local btn = CreateFrame("Button", "myButton", UIParent, "SecureActionButtonTemplate"); btn:SetAttribute("type", "action"); btn:SetAttribute("action", 1); Modified attributes Some attribute may change value based on whether a particular combination of modifier keys is held down and/or a particular button is being clicked.

The "modified attribute" name takes the form of: modifier-name-button. A limited precedence order is defined by the Frame:GetAttribute method. Button remapping Action Types Other attributes.