WoW:API GameTooltip AddTexture: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Updated link text.)
m (Move page script moved page API GameTooltip AddTexture to API GameTooltip AddTexture without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod}}


<center>'''Title''' ''-Documentation by [[user:Egingell|Egingell]]-''</center>
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->


--[[
   GameTooltip:AddTexture(texturePath)
  PNG or BLP (without the .blp extension) relative to the Addon's directory with the WoW install
  directory being the top level (eg "\\interface" = "C:\\Program Files\\World of Warcraft\\interface").
  You'll probably use the texture returned by [[API GetItemInfo|GetItemInfo]]().
--]]
   GameTooltip:AddTexture(texture);


<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
Line 15: Line 9:
Adds a texture (icon) to the beginning of the last line added by [[API GameTooltip_AddLine|AddLine]](), [[API GameTooltip_AddDoubleLine|AddDoubleLine]](), etc.
Adds a texture (icon) to the beginning of the last line added by [[API GameTooltip_AddLine|AddLine]](), [[API GameTooltip_AddDoubleLine|AddDoubleLine]](), etc.


Note: There appears to be a limit of 10 textures per tooltip.
Note: There is a limit of 10 textures per tooltip (as seen in [http://wdn.wowinterface.com/code/0307485/FrameXML/GameTooltipTemplate.xml GameTooltipTemplate.xml])
 
As what I got in GameTooltipTemplate.xml[http://wdn.wowinterface.com/code/0307485/FrameXML/GameTooltipTemplate.xml], there are ''10'' '''Texture''' elements defined in '''GameTooltipTemplate'''.

Latest revision as of 04:45, 15 August 2023

Widget API ← GameTooltip < AddTexture


 GameTooltip:AddTexture(texturePath)


Adds a texture (icon) to the beginning of the last line added by AddLine(), AddDoubleLine(), etc.

Note: There is a limit of 10 textures per tooltip (as seen in GameTooltipTemplate.xml)