WoW:API GameTooltip SetBagItem: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API GameTooltip SetBagItem to API GameTooltip SetBagItem without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod}}
<center>'''GameTooltip:SetBagItem''' ''-Documentation by [[user:Xenoveritas|Xenoveritas]]-''</center>
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->


  hasCooldown, repairCost = GameTooltip:SetBagItem(bag, slot);
  hasCooldown, repairCost = GameTooltip:SetBagItem(bag, slot);
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->


Sets the GameTooltip to contain text information about the specified item, as well as returning whether the item is "cooling down" and the cost to repair the item (which may be 0 (or nil?) if non-applicable).
Sets the GameTooltip to contain text information about the specified item, as well as returning whether the item is "cooling down" and the cost to repair the item (which may be 0 (or nil?) if non-applicable).
Line 13: Line 7:
----
----
;''Arguments''
;''Arguments''
<!-- List each argument, together with its type -->


:(bag, slot)
:(bag, slot)
Line 22: Line 14:
----
----
;''Returns''
;''Returns''
<!-- List each return value, together with its type -->


:hasCooldown, repairCost
:hasCooldown, repairCost
Line 31: Line 21:
----
----
;''Details''
;''Details''
<!-- Details not appropriate for the main description can go here -->


: This simply sets the text of the game tooltip to contain various information about the item under the given slot.
: This simply sets the text of the game tooltip to contain various information about the item under the given slot.

Latest revision as of 04:45, 15 August 2023

Widget API ← GameTooltip < SetBagItem

hasCooldown, repairCost = GameTooltip:SetBagItem(bag, slot);

Sets the GameTooltip to contain text information about the specified item, as well as returning whether the item is "cooling down" and the cost to repair the item (which may be 0 (or nil?) if non-applicable).


Arguments
(bag, slot)
bag
Numeric - the ID of the bag
slot
Numeric - the ID of the slot

Returns
hasCooldown, repairCost
hasCooldown
Boolean - if the item currently has a cooldown
repairCost
Integer - the cost to repair the item, may be 0 or nil if the item cannot be repaired.

Details
This simply sets the text of the game tooltip to contain various information about the item under the given slot.