OnClientBrowserTooltip

From Multi Theft Auto: Wiki
Revision as of 19:55, 19 September 2018 by 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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