OnClientBrowserTooltip: Difference between revisions
Jump to navigation
Jump to search
Lars-Marcel (talk | contribs) (Created page with "__NOTOC__ {{Client event}} {{New feature/item|3.0150|1.5|| The event is triggered when the user hovers a tooltip. }} ==Parameters== <syntaxhighlight lang="lua"> string text...") |
Lars-Marcel (talk | contribs) No edit summary |
||
| Line 32: | Line 32: | ||
outputChatBox("You are not longer hovering a tooltip") | outputChatBox("You are not longer hovering a tooltip") | ||
end | end | ||
end | end) | ||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 19:55, 19 September 2018
The event is triggered when the user hovers a tooltip.
Parameters
string text
- text: string containing the tooltip text. Empty string if user is not longer hovering.
Source
The webbrowser element.
Example
If the user hovers the Google search input field 'Tooltip-Text: Search' will be printed in the chatbox.
local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false)
local theBrowser = guiGetBrowser(browser)
showCursor(true)
addEventHandler( "onClientBrowserCreated", theBrowser, function()
loadBrowserURL(source, "https://www.google.com/?ncr&hl=en")
end)
addEventHandler("onClientBrowserTooltip", root, function(text)
if (text ~= "") then
outputChatBox("Tooltip-Text: "..text)
else
outputChatBox("You are not longer hovering a tooltip")
end
end)
See Also
- onClientBrowserCreated
- onClientBrowserCursorChange
- onClientBrowserDocumentReady
- onClientBrowserInputFocusChanged
- onClientBrowserLoadingFailed
- onClientBrowserLoadingStart
- onClientBrowserNavigate
- onClientBrowserPopup
- onClientBrowserResourceBlocked
- onClientBrowserTooltip
- onClientBrowserWhitelistChange