WoW:API GameTooltip SetFrameStack: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Initial writeup based on http://forums.worldofwarcraft.com/thread.html?topicId=25578318852&postId=255759571387&sid=1#2)
 
m (Move page script moved page API GameTooltip SetFrameStack to API GameTooltip SetFrameStack without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 17: Line 17:


== Notes ==
== Notes ==
The '''/framestack [S]''' slash command toggles a pre-declared GameTooltip and dispatches this function on it.  The optional '''S''' argument is interpreted as a boolean following the usual boolean type coercion rules, and passed to this method as the ''showhidden'' parameterFor example, <tt>'/framestack true'</tt> and <tt>'/framestack cheese'</tt> both show hidden frames.
The '''/framestack [showHidden]''' slash command toggles a pre-declared GameTooltip and dispatches this function on it.  When followed by 'true', hidden frames will also be shownNo value other than 'true' will cause hidden frames to be shown.


The frame listing on a tooltip after this function is called are arranged by [[UITYPE_FrameStrata|strata]] and [[FrameLevel#Frame_Levels|level]].  Within that list, the frames are colored:
The frame listing on a tooltip after this function is called are arranged by [[UITYPE_FrameStrata|strata]] and [[FrameLevel#Frame_Levels|level]].  Within that list, the frames are colored:

Latest revision as of 04:45, 15 August 2023

Widget API ← GameTooltip < SetFrameStack

Displays the frame stack of the mouse cursor's current position on the tooltip. This is not intended to be used in typical addons, but is part of the Blizzard_DebugTools "builtin addon" inspired by DevTools.

Arguments[edit]

(showhidden)
showhidden
Boolean - If true, includes in the display those frames which are currently hidden.

Returns[edit]

nil

Example[edit]

GameTooltip_SetDefaultAnchor(GameTooltip, UIParent)
GameTooltip:SetFrameStack(true)

Shows the GameTooltip with information about the frames over which the mouse is currently hovering.

Notes[edit]

The /framestack [showHidden] slash command toggles a pre-declared GameTooltip and dispatches this function on it. When followed by 'true', hidden frames will also be shown. No value other than 'true' will cause hidden frames to be shown.

The frame listing on a tooltip after this function is called are arranged by strata and level. Within that list, the frames are colored:

  • Yellow/Orange : frame for which IsMouseEnabled is true
  • Blue/Teal : frame for which IsMouseEnabled is false
  • DarkGrey/LightGrey : frame that is hidden (when showhidden is true)

In each of those pairs, the colors alternate based on the frame level. For example, in a series of four frames all with the mouse enabled and within the same frame level the colors will alternate like this:

  • 4 Orange
  • 3 Yellow
  • 2 Orange
  • 1 Yellow