WoW:API GameTooltip AddTexture: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API GameTooltip AddTexture to API GameTooltip AddTexture without leaving a redirect)
 
(One intermediate revision by one other user not shown)
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'''.

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)