WoW:FrameXML elements: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page FrameXML elements to FrameXML elements without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Stub/API}}
== Overview ==
== Overview ==


This document describes various important UI elements which are provided by the standard World of Warcraft FrameXML UI.
This document describes various important UI elements which are provided by the standard World of Warcraft FrameXML UI.
== Tooltips ==
=== GameTooltip ===
This is the game's tooltip, it consists of a number of lines, to determine how many there are, you can call the [[API GameToolTip NumLines|GameTooltip:NumLines()]] function.
=== GameTooltipTextLeft<i>&lt;num&gt;</i> ===
Each line of text from the game tooltip is represented by one of these objects, replace &lt;num&gt; with the appropriate line number (from 1 to the number of lines returned from GameTooltip:NumLines()). To obtain the text of a line call the [[API FontString GetText|GameTooltipTextLeft<i>&lt;num&gt;</i>:GetText()]] function.
==== Example: Looping through all tooltip lines ====
for i, GameTooltip:NumLines() do
    local mytext = getglobal("GameTooltipTextLeft" .. i)
    local text = mytext:GetText()
end
==== Notes ====
The tooltip displayed when the mouse is hovering over players and/or NPCs on the minimap is such that all the units being displayed are actually only on the first tooltip line.  So, if the tooltip showed 4 players, the names are all in the first tootip line, delimited by "\n".
=== GameTooltipTextRight<i>&lt;num&gt;</i> ===
Some tooltips have both left- and right-aligned sections. In order to get at the right-aligned section, use one of these objects instead of a GameTooltipTextLeft. Otherwise, the functionality is identical.


=== MinimapCluster ===
=== MinimapCluster ===
Line 36: Line 13:
  end
  end


[[Category:Interface Customization]]
[[Category:FrameXML documentation]]

Latest revision as of 04:48, 15 August 2023

Overview[edit]

This document describes various important UI elements which are provided by the standard World of Warcraft FrameXML UI.

MinimapCluster[edit]

Frame which represents the minimap area of the user interface.

Example: Determining if the mouse is over the minimap[edit]

if (MouseIsOver(MinimapCluster)) then
   -- do something
end