WoW:UIHANDLER OnTooltipAddMoney: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page UIHANDLER OnTooltipAddMoney to UIHANDLER OnTooltipAddMoney without leaving a redirect)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<center>'''GameTooltip:OnTooltipAddMoney''' ''-Documentation by [[User:Greenman|Greenman]]-''</center>
{{widgethandler}}
Invoked when money information needs to be added to a tooltip.


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
== Arguments ==
GameTooltip:OnTooltipAddMoney(money);
:;arg1: Number - amount of money to add, in copper pieces.
 
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
Called when the money amount and graphics are added to the tooltip text.
 
----
;''Arguments''
 
<!-- List each argument, together with its type -->
:(money)
:;money : integer - amount of money to add, in copper pieces.
 
----
;''Returns''
 
<!-- List each return value, together with its type -->
: The function returns nothing.
 
----
;''Example''
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->


== Example ==
  -- overload the base function with a custom routine
  -- overload the base function with a custom routine
  Saved_OnTooltipAddMoney = MyTooltip:GetScript("OnTooltipAddMoney");
  Saved_OnTooltipAddMoney = MyTooltip:GetScript("OnTooltipAddMoney");
Line 34: Line 16:




----
== Details ==
;''Details''
: This function was added in v1.7 and replaces the functionality that used to be provided by trapping the TOOLTIP_ADD_MONEY event. It is most commonly used to get merchant sell values when you scan the items in the inventory.
 
: This function is new for 1700. It replaces the functionality that used to be provided by trapping the TOOLTIP_ADD_MONEY event. It is most commonly used to get merchant sell values when you scan the items in the inventory.
 
----
{{Template:WoW API}}
<!-- Update the category to the appropriate subsection, and be sure to put the function name as the label for the category link. Multiple subcategories are okay if appropriate, please dont link functions to the API Functions category directly. -->
[[Category:API Frame Functions|OnTooltipAddMoney]]

Latest revision as of 04:49, 15 August 2023

Widget handlers < OnTooltipAddMoney

Invoked when money information needs to be added to a tooltip.

Arguments[edit]

arg1
Number - amount of money to add, in copper pieces.

Example[edit]

-- overload the base function with a custom routine
Saved_OnTooltipAddMoney = MyTooltip:GetScript("OnTooltipAddMoney");
MyTooltip:SetScript("OnTooltipAddMoney", My_OnTooltipAddMoney);
-- my custom routine
function My_OnTooltipAddMoney ()
  Saved_OnTooltipAddMoney();
  -- do something extra with the money amount in arg1
end


Details[edit]

This function was added in v1.7 and replaces the functionality that used to be provided by trapping the TOOLTIP_ADD_MONEY event. It is most commonly used to get merchant sell values when you scan the items in the inventory.