Widget API: GameTooltip:SetLootItem

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GameTooltip SetLootItem to API GameTooltip SetLootItem without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Widget API ← GameTooltip < SetLootItem

Sets the GameTooltip to show a loot item.

GameTooltip:SetLootItem(lootIndex)


Arguments

lootIndex
Number - The index of the loot item to show (from 1 to GetNumLootItems())


Returns

nil


Example

<GameTooltip name="MyGameTooltip" inherits="GameTooltipTemplate" parent="UIParent" hidden="true"/>
MyGameTooltip:SetLootItem(GetNumLootItems());

Result

Sets the GameTooltip to show the last loot item.