RSS

Суббота, 21.12.2024, 19:45
Главная » WoW API » Событий API Виджетов »

OnHyperlinkClick

[ править ]
Run when the mouse clicks a hyperlink in the scrolling message frame or SimpleHTML frame.
[клоны]
Run when the mouse clicks a hyperlink in the scrolling message frame or SimpleHTML frame. This script handler is run when the mouse button is released while the mouse cursor is over the same hyperlink text in which the mouse button was pressed.


Signature:
Code
OnHyperlinkClick(self, "linkData", "link", "button")

Arguments:
  • self - Reference to the widget for which the script was run (frame)
  • linkData - Essential data (linktype:linkdata portion) of the hyperlink (e.g. "quest:982:17") (string)
  • link - Complete hyperlink text (e.g. "cffffff00Hquest:982:17h[Deep Ocean, Vast Sea]hr") (string, hyperlink)
  • button - Name of the mouse button responsible for the click action (string)
      Button4
    • Button5
    • LeftButton
    • MiddleButton
    • RightButton

Examples:
-- Print information about a clicked hyperlink
local someMessageFrame = WowLuaFrameOutput
someMessageFrame:SetScript("OnHyperlinkClick", function(self, linkData, link, button)
self:AddMessage(format("You clicked on %s with %s", link, button))
end)

Доступна для: EditBox, ScrollingMessageFrame, SimpleHTML

Также смотрите: Событий API Виджетов
Ссылки: http://wowprogramming.com/docs/scripts/OnHyperlinkClick