Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GameTooltip SetAction

Last wiki revision 2022-07-22

shouldUpdate = GameTooltip:SetAction(slot)

Shows the tooltip for the specified action button.

  • Arguments
  • slot : integer - id of the action button to load the tooltip for.
  • Returns
  • shouldUpdate : boolean - true if the action is on cooldown or has a duration and the tooltip should be refreshed.
  • Example

GameTooltip:SetAction(1)

  • Details
  • The term 'slot' is a bit misleading... it's really the id of the action button, where 1..12 are the first page, 13..24 are the second page, and so on up to 72 for the normally accessible pages 1-6. The bonus bars that appear for a warrior's stances, a druid's shapeshifts, and when a rogue is stealthed take up higher numbered ids, and some addons make use of otherwise unused ids as well (up to a maximum ID of 120). Note that for accessing the pet bar or aura bar you need to use SetPetAction or SetShapeshift.
  • Beware of using, for example, ActionButton1:GetID; This would return 1, no matter what page your action bar is on. The WoW function CURRENT_ACTIONBAR_PAGE may be of use to you if you want to do something like this, or if you have the button object already, ActionButton_GetPagedID(button).

Source

https://warcraft.wiki.gg/wiki/API_GameTooltip_SetAction · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.