moved code for enumerating from the UnitName page
No edit summary |
(moved code for enumerating from the UnitName page) |
||
| Line 24: | Line 24: | ||
=== Rogues === | === Rogues === | ||
ActionBar page 1 Stealth: slots 73 to 84 | ActionBar page 1 Stealth: slots 73 to 84 | ||
== Example Code == | |||
This function will display the contents of each of the 120 action slots (skipping empty ones) in the default chat frame. To use, type "/script reportActionButtions()". | |||
function reportActionButtons() | |||
for local lActionSlot = 1, 120 do | |||
local lActionText = GetActionText(lActionSlot) | |||
local lActionTexture = GetActionTexture(lActionSlot) | |||
if lActionTexture then | |||
local lMessage = "Slot " .. lActionSlot .. ": [" .. lActionTexture .. "]" | |||
if lActionText then lMessage = lMessage .. " \"" .. lActionText .. "\"" | |||
DEFAULT_CHAT_FRAME:AddMessage(lMessage) | |||
end | |||
end | |||
end | |||