WoW:API GameTooltip AddTexture: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
(Added some certainty, removed explanation of texture path (which is covered elsewhere on this site))
Line 3: Line 3:
<!-- 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 14: 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 per [http://wdn.wowinterface.com/code/0307485/FrameXML/GameTooltipTemplate.xml GameTooltipTemplate.xml], there are ''10'' '''Texture''' elements defined in '''GameTooltipTemplate'''.

Revision as of 00:06, 25 January 2009

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)