ResizeBrowser: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:
Allows resizing of CEF browsers at runtime.
Allows resizing of CEF browsers at runtime.
}}
}}
{{Warning|Do '''not''' use this function with [[onClientRender]] as it re-creates the underlying texture internally (which is an expensive operation).|true}}


==Syntax==
==Syntax==

Revision as of 11:40, 6 September 2016

Allows resizing of CEF browsers at runtime.

Dialog-warning.png Warning: Do not use this function with onClientRender as it re-creates the underlying texture internally (which is an expensive operation).

Syntax

bool resizeBrowser ( browser webBrowser, float width, float height )

Required Arguments

  • webBrowser: The browser you want to resize.
  • width: The new width of the browser.
  • height: The new height of the browser.

Returns

Returns true if the browser is resized successfully, false if there's something wrong.

Example

Accessories-text-editor.png Script Example Missing Function ResizeBrowser needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.
-- TODO


See Also