GameTooltips are used to display explanatory information relevant to a particular element of the game world. They offer almost innumerable methods for setting the specific object, creature or ability the tooltip should describe, and a smaller number of methods for querying what it is that the tooltip is currently describing.
GameTooltips are sufficiently complicated that an entire chapter is dedicated to describing them. In addition to methods for setting their contents, they also support options controlling their positioning and visibility on screen, as well as methods to facilitate adding more text to them (for instance, an addon that displays, in the tooltip for a soul shard created by a warlock, the name of the player or monster from which the shard was collected).
While most of the heavy lifting is done by the frame called simply GameTooltip, there is also one called ItemRefTooltip that does the work of displaying information about items linked in chat when they are clicked.
Defined Methods
- GameTooltip:AddSpellByID() - This function is not yet documented
- GameTooltip:AdvanceSecondaryCompareItem() - This function is not yet documented
- GameTooltip:ResetSecondaryCompareItem() - This function is not yet documented
- GameTooltip:SetAchievementByID() - This function is not yet documented
- GameTooltip:SetCompareItem() - This function is not yet documented
- GameTooltip:SetCurrencyTokenByID() - This function is not yet documented
- GameTooltip:SetGlyphByID() - This function is not yet documented
- GameTooltip:SetInstanceLockEncountersComplete() - This function is not yet documented
- GameTooltip:SetInventoryItemByID() - This function is not yet documented
- GameTooltip:SetItemByID() - This function is not yet documented
- GameTooltip:SetLFGCompletionReward() - This function is not yet documented
- GameTooltip:SetLFGDungeonReward() - This function is not yet documented
- GameTooltip:SetLFGDungeonShortageReward() - This function is not yet documented
- GameTooltip:SetLootCurrency() - This function is not yet documented
- GameTooltip:SetMissingLootItem() - This function is not yet documented
- GameTooltip:SetMountBySpellID() - This function is not yet documented
- GameTooltip:SetQuestCurrency() - This function is not yet documented
- GameTooltip:SetQuestLogCurrency() - This function is not yet documented
- GameTooltip:SetSpellBookItem() - This function is not yet documented
- GameTooltip:SetToyByItemID() - This function is not yet documented
- GameTooltip:SetTransmogrifyItem() - This function is not yet documented
- GameTooltip:SetUnitConsolidatedBuff() - This function is not yet documented
- GameTooltip:SetUpgradeItem() - This function is not yet documented
- GameTooltip:SetVoidDepositItem() - This function is not yet documented
- GameTooltip:SetVoidItem() - This function is not yet documented
- GameTooltip:SetVoidWithdrawalItem() - This function is not yet documented
Inherited Methods
- GameTooltip:GetPropagateKeyboardInput() - This function is not yet documented
- GameTooltip:IsForbidden() - This function is not yet documented
- GameTooltip:RegisterUnitEvent() - This function is not yet documented
- GameTooltip:SetDontSavePosition() - This function is not yet documented
- GameTooltip:SetPropagateKeyboardInput() - This function is not yet documented
- GameTooltip:SetShown() - This function is not yet documented
- GameTooltip:SetSize(width, height) - Sets the size of the region to the specified values
- GameTooltip:SetToplevel(enable) - Sets whether the frame should automatically come to the front when clicked
- GameTooltip:SetUserPlaced(enable) - Flags the frame for automatic saving and restoration of position and dimensions
- GameTooltip:SetWidth(width) - Sets the region's width
- GameTooltip:Show() - Shows the region
- GameTooltip:StartMoving() - Begins repositioning the frame via mouse movement
- GameTooltip:StartSizing() - Begins resizing the frame via mouse movement
- GameTooltip:StopAnimating() - Stops any active animations involving the region or its children
- GameTooltip:StopMovingOrSizing() - Ends movement or resizing of the frame initiated with [[docs/widgets/Frame/StartMoving|`:StartMoving()`]] or [[docs/widgets/Frame/StartSizing|`:StartSizing()`]]
- GameTooltip:UnregisterAllEvents() - Unregisters the frame from any [[docs/events|events]] for which it is registered
- GameTooltip:UnregisterEvent("event") - Unregisters the frame for an event
Script Handlers
- OnAttributeChanged(self, "name", value) - Run when a frame attribute is changed
- OnChar(self, "text") - Run for each text character typed in the frame
- OnDisable(self) - Run when the frame is disabled
- OnDragStart(self, "button") - Run when the mouse is dragged starting in the frame
- OnDragStop(self) - Run when the mouse button is released after a drag started in the frame
- OnEnable(self) - Run when the frame is enabled
- OnEnter(self, motion) - Run when the mouse cursor enters the frame's interactive area
- OnEvent(self, "event", ...) - Run whenever an [[docs/events|event]] fires for which the frame is registered
- OnHide(self) - Run when the frame's visbility changes to hidden
- OnKeyDown(self, "key") - Run when a keyboard key is pressed if the frame is keyboard enabled
- OnKeyUp(self, "key") - Run when a keyboard key is released if the frame is keyboard enabled
- OnLeave(self, motion) - Run when the mouse cursor leaves the frame's interactive area
- OnLoad(self) - Run when the frame is created
- OnMouseDown(self, "button") - Run when a mouse button is pressed while the cursor is over the frame
- OnMouseUp(self, "button") - Run when the mouse button is released following a mouse down action in the frame
- OnMouseWheel(self, delta) - Run when the frame receives a mouse wheel scrolling action
- OnReceiveDrag(self) - Run when the mouse button is released after dragging into the frame
- OnShow(self) - Run when the frame becomes visible
- OnSizeChanged(self, width, height) - Run when a frame's size changes
- OnTooltipAddMoney(self, amount, maxAmount) - Run when an amount of money should be added to the tooltip
- OnTooltipCleared(self) - Run when the tooltip is hidden or its content is cleared
- OnTooltipSetAchievement(self) - Run when the tooltip is filled with information about an achievement
- OnTooltipSetDefaultAnchor(self) - Run when the tooltip is repositioned to its default anchor location
- OnTooltipSetEquipmentSet(self) - Run when the tooltip is filled with information about an equipment set
- OnTooltipSetFrameStack(self) - Run when the tooltip is filled with a list of frames under the mouse cursor
- OnTooltipSetItem(self) - Run when the tooltip is filled with information about an item
- OnTooltipSetQuest(self) - Run when the tooltip is filled with information about a quest
- OnTooltipSetSpell(self) - Run when the tooltip is filled with information about a spell
- OnTooltipSetUnit(self) - Run when the tooltip is filled with information about a unit
- OnUpdate(self, elapsed) - Run each time the screen is drawn by the game engine