WoW:API ToggleSpellBook: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
Line 10: Line 10:
=== Arguments ===
=== Arguments ===


:;bookType: string containing which spellbook to open. Valid choices are "spell", "pet", "general", or any spec name (e.g. "assasination", "fire", etc). Only "spell" and "pet" will open the full spellbook (with all the tabs to click on), the rest will open only that tab (with no tabs to click on).
:;bookType: string containing which spellbook to open. Valid choices are "spell", "mount", "pet", "general", or any spec name (e.g. "assasination", "fire", etc). Only "spell" and "pet" will open the full spellbook (with all the tabs to click on), the rest will open only that tab (with no tabs to click on).
 
:;bookType (in version 4.2.0.14480): string is optional. without parameter opens the book with the last used tab. current valid choices are "spell", "mount", "professions", "pet", "companions" for the bottom tabs line. direct accessability for talent spell are missing.





Revision as of 19:27, 24 August 2011


WoW API < ToggleSpellBook

"I" iconThis function is implemented in Lua here FrameXML/SpellBookFrame.lua.


ToggleSpellBook(bookType);

Shows/Hides the Spellbook.


Parameters

Arguments

bookType
string containing which spellbook to open. Valid choices are "spell", "mount", "pet", "general", or any spec name (e.g. "assasination", "fire", etc). Only "spell" and "pet" will open the full spellbook (with all the tabs to click on), the rest will open only that tab (with no tabs to click on).
bookType (in version 4.2.0.14480)
string is optional. without parameter opens the book with the last used tab. current valid choices are "spell", "mount", "professions", "pet", "companions" for the bottom tabs line. direct accessability for talent spell are missing.


Returns

nil


Example

ToggleSpellBook("spell");


Details

Shows the Spellbook. Equivalent to pressing 'P'. Note that if you do not have any pet spells, passing in "pet" will do nothing.
If you want to open the spellbook using Lua, don't use this, use ToggleFrame(SpellBookFrame) instead.