Navigation menu

WoW:API SetItemRef: Difference between revisions

Jump to navigation Jump to search
m
Move page script moved page API SetItemRef to WoW:API SetItemRef without leaving a redirect
No edit summary
m (Move page script moved page API SetItemRef to WoW:API SetItemRef without leaving a redirect)
 
(8 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<center>'''SetItemRef''' ''-Documentation by [[user:Deathshadow|Deathshadow]]-''</center>
{{framexmlfunc|FrameXML/ItemRef.lua}}
 
Called to handle clicks on Blizzard hyperlinks in chat.
Handles Links in Chat, orginally just Itemlinks but now also handles PlayerLinks.
  SetItemRef(link, text, button);
  SetItemRef(link, text, button);


== Parameters ==
== Arguments ==
=== Arguments ===
;link : String - Link to Use, (eg 'item:3577:0:0:0:0:0:0:276308480' is a [Gold Bar], 'player:Kaso' is [Kaso]).
:;link : String - Link to Use, (eg 'item:3577:0:0:276308480' is a [Gold Bar], 'player:Kaso' is [Kaso]).
;text : String - The Text of the link, including Text Colour Infomation and itemlinks (eg The previous two examples :  
:;text : String - The Text of the link, including Text Colour Infomation and itemlinks (eg The previous two examples :  
::'|cff1eff00|Hitem:3577:0:0:0:0:0:0:276308480|h[Gold Bar]|h|r'
:::'|cff1eff00|Hitem:3577:0:0:276308480|h[Gold Bar]|h|r'
::'|Hplayer:Kaso|h[Kaso]|h'
:::'|Hplayer:Kaso|h[Kaso]|h'
;button : String - The button used to click the notes 'LeftButton' or 'RightButton' Apparently, See Notes.
 
:;button : String - The button used to click the notes 'LeftButton' or 'RightButton' Apparently, See Notes.
 
=== Returns ===
:;''Returns nil''


== Notes ==
== Notes ==
:This function is affected by ShiftKey, Ctrl Key and Depending On button Variable as shown in the following table:
* Do not insecurely hook this function to add your own link types; hook {{api|ChatFrame_OnHyperlinkShow}}(frame, link, text, button) instead. Hooking this function insecurely will end up tainting Blizzard's combat log, which will taint UIParent's update routines and result in "action has been blocked" messages.
 
* This function is affected by Shift and Ctrl keys, and depends on what is being clicked, according to the below table:
<TABLE FRAME=BOX CELLSPACING=0 COLS=7 RULES=GROUPS BORDER=1>
<TR>
<TD WIDTH=86 HEIGHT=18 ALIGN=CENTER><BR></TD>
<TD COLSPAN=2 WIDTH=393 ALIGN=CENTER>Ctrl Key</TD>
<TD COLSPAN=2 WIDTH=237 ALIGN=CENTER>Shift Key</TD>
<TD COLSPAN=2 WIDTH=312 ALIGN=CENTER>None</TD>
</TR>
<TR>
<TD HEIGHT=17 ALIGN=CENTER><BR></TD>
<TD ALIGN=CENTER>Left Button</TD>
<TD ALIGN=CENTER>Right Button</TD>
<TD ALIGN=CENTER>Left Button</TD>
<TD ALIGN=CENTER>Right Button</TD>
<TD ALIGN=CENTER>Left Button</TD>
<TD ALIGN=CENTER>Right Button</TD>
</TR>
<TR>
<TD HEIGHT=18 ALIGN=CENTER>Player Link</TD>
<TD ALIGN=CENTER>#</TD>
<TD ALIGN=CENTER>#</TD>
<TD ALIGN=CENTER>Send Player /who</TD>
<TD ALIGN=CENTER>Send Player /who</TD>
<TD ALIGN=CENTER>Open Tell</TD>
<TD ALIGN=CENTER>Open Drop Down Tooltip</TD>
</TR>
<TR>
<TD HEIGHT=18 ALIGN=CENTER>Item Link</TD>
<TD ALIGN=CENTER>Show Dressing Room For Item</TD>
<TD ALIGN=CENTER>Show Dressing Room For Item</TD>
<TD ALIGN=CENTER>Link Item in Chat</TD>
<TD ALIGN=CENTER>Link Item in Chat</TD>
<TD ALIGN=CENTER>Show ItemRefToolTip</TD>
<TD ALIGN=CENTER>Show ItemRefToolTip</TD>
</TR>
</TABLE>


<br><center><i>Last updated: Patch 1.10.1</i></center>
{| style="margin-left: 3em;"
----
|- cellpadding=2
__NOTOC__
||
{{Template:WoW API}}
|style="padding-right:2em;" rowspan=9 |
|style="padding-right:1em; border-left: 1px solid;" rowspan=9 |
|colspan=4 align=center| Ctrl Key
|style="padding-right:2em;" rowspan=9 |
|style="padding-right:1em; border-left: 1px solid;" rowspan=9 |
|colspan=4 align=center| Shift Key
|style="padding-right:2em;" rowspan=9 |
|style="padding-right:1em; border-left: 1px solid;" rowspan=9 |
|colspan=4 align=center| No modifier
|style="padding-right:2em;" rowspan=9 |
|-
||
|| Left Button
|style="padding-right:1em;" rowspan=8 |
|style="padding-right:1em; border-left: 1px dotted;" rowspan=8 |
|| Right Button
|| Left Button
|style="padding-right:1em;" rowspan=8 |
|style="padding-right:1em; border-left: 1px dotted;" rowspan=8 |
|| Right Button
|| Left Button
|style="padding-right:1em;" rowspan=8 |
|style="padding-right:1em; border-left: 1px dotted;" rowspan=8 |
|| Right Button
|-
|colspan=20 style="border-top: 1px solid; padding-bottom: 1ex;"|
|-
||Player Link: || -      || -      || /who player  || /who player  || Open Tell    || Dropdown menu
|-
||Item Link:   || Dressup || Dressup || Link in chat || Link in chat || Show tooltip || Show tooltip
|}
Anonymous user