WoW:Changing a button's action slot ID: Difference between revisions
Jump to navigation
Jump to search
m
Gramatical and format corrections
(Updated to be 2.0 compatible) |
m (Gramatical and format corrections) |
||
| Line 1: | Line 1: | ||
Sometimes you would like to control the action a button will start when it is clicked. Maybe you want to add extra buttons, maybe you just want to control the behavior of existing ones. I will tell you in a moment how to do that, but first you should know something about how the default UI handles | Sometimes you would like to control the action a button will start when it is clicked. Maybe you want to add extra buttons, maybe you just want to control the behavior of existing ones. I will tell you in a moment how to do that, but first you should know something about how the default UI handles its buttons. | ||
'''IMPORTANT: Recommendations involving changing ActionButton_GetPagedID do not work after WoW 2.0''' | |||
==Button Handling in the Default UI== | ==Button Handling in the Default UI== | ||
World of Warcraft supplies the player with 6 action bars, each having 12 buttons. Some classes like warriors, rogues and druids have a few more bars due to their stances. | World of Warcraft supplies the player with 6 action bars, each having 12 buttons. Some classes, like warriors, rogues and druids have a few more bars due to their stances. have you ever noticed that the lower left bar changes its actions when you go in stealth or in battle stance? When changing stances, there are no buttons hidden or shown. Whatever stance you are in, the buttons remain tight at their position. What's actually changing are the action slot IDs of the buttons. You can read a bit more about this here: [[ActionSlot]] API Type. Two buttons having the same action ID means they are twins. If you drag an action onto one of them, the other one will adopt this action, too. This is because the potions, spells, abilities, macros, etc. on your buttons are not bound to the button itself, but to its action ID. | ||
So, how does a button know its action ID? Let's look at Blizzard's ActionButton.lua, which you can obtain by downloading the Blizzard Interface Customization Tools here: http://www.blizzard.com/support/wow/?id=aww01669p (after installing this, you can find ActionButton.lua in "/Blizzard Interface Data/FrameXML"). The functions in this file handle the behaviour of (guess what?) buttons. But not of any buttons. The methods there are used by the action buttons on your bars. | So, how does a button know its action ID? Let's look at Blizzard's ActionButton.lua, which you can obtain by downloading the Blizzard Interface Customization Tools here: http://www.blizzard.com/support/wow/?id=aww01669p (after installing this, you can find ActionButton.lua in "/Blizzard Interface Data/FrameXML"). The functions in this file handle the behaviour of (guess what?) buttons. But not of any buttons. The methods there are used by the action buttons on your bars. | ||