Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(Returns the frame that the cursor is over.)
 
(removedapi)
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  +
{{removedapi|3.0|Crafting API was absorbed into [[World of Warcraft API#TradeSkill Functions|Tradeskill API]].}}
== API GetMouseFocus() ==
 
  +
{{wowapi}}
  +
''CatalystName, 1'' GetCraftSpellFocus(''index'')
   
 
=== Arguments ===
Returns the frame that the cursor is over.
 
   
  +
:;index : Numeric - 1 to [[API GetNumCrafts|GetNumCrafts()]]
frame = GetMouseFocus();
 
----
 
'''''Arguments'''''
 
   
 
=== Returns ===
none
 
----
 
'''''Returns'''''
 
   
  +
When called while the enchanting screen is open, this function returns which rod is required, if any. I don't know whether this function also applies to other types of crafts or spells.
frame
 
   
  +
Returns two values when a rod is required: a string that contains the name of the rod, and the number "1". I don't know what the "1" means.
(<user data> a frame object.)
 
----
 
'''''Example'''''
 
   
  +
Returns nil if no rods are required.
local framename = GetMouseFocus():GetName();
 
 
DEFAULT_CHAT_FRAME:AddMessage( framename );
 
 
 
Results:
 
Displays the name of the frame that the mouse is over.
 
 
 
Note: The background frame for the 3D window is WorldFrame.
 

Revision as of 13:21, 28 May 2009

CatalystName, 1 GetCraftSpellFocus(index)

Arguments

index
Numeric - 1 to GetNumCrafts()

Returns

When called while the enchanting screen is open, this function returns which rod is required, if any. I don't know whether this function also applies to other types of crafts or spells.

Returns two values when a rod is required: a string that contains the name of the rod, and the number "1". I don't know what the "1" means.

Returns nil if no rods are required.