InjectBrowserMouseUp: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client_function}} This function injects a mouse click (state: up). ==Syntax== <syntaxhighlight lang="lua"> bool injectBrowserMouseUp ( browser webBrowser, string mouseButton ) ...")
 
m (Link to the Romanian translation of this page added.)
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client_function}}
{{Client function}}
{{New feature/item|3.0150|1.5||
This function injects a mouse click (state: up).  
This function injects a mouse click (state: up).  
}}


==Syntax==
==Syntax==
Line 7: Line 9:
bool injectBrowserMouseUp ( browser webBrowser, string mouseButton )
bool injectBrowserMouseUp ( browser webBrowser, string mouseButton )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Element/Browser|browser]]:injectMouseUp}}


===Required arguments===
===Required arguments===
Line 16: Line 19:


==Example==
==Example==
Todo
<syntaxhighlight lang="lua">addEventHandler("onClientClick", root,
function(button, state)
if state == "down" then
injectBrowserMouseDown(browser, button)
else
injectBrowserMouseUp(browser, button)
end
end
)</syntaxhighlight>


==See Also==
==See also==
Todo
{{CEF_functions}}
 
[[hu:injectBrowserMouseUp]]
[[RO:injectBrowserMouseUp]]

Latest revision as of 12:22, 8 April 2020

This function injects a mouse click (state: up).

Syntax

bool injectBrowserMouseUp ( browser webBrowser, string mouseButton )

OOP Syntax Help! I don't understand this!

Method: browser:injectMouseUp(...)


Required arguments

  • webBrowser: The web browser
  • mouseButton: The mouse button (Possible values: left, middle, right)

Returns

Returns true if the click was successfully injected, false otherwise.

Example

addEventHandler("onClientClick", root,
	function(button, state)
		if state == "down" then
			injectBrowserMouseDown(browser, button)
		else
			injectBrowserMouseUp(browser, button)
		end
	end
)

See also