- Documentation
- Client functions
- guiCreateBrowser
Function
guiCreateBrowser
Creates a browser as a GUI control. Mouse, wheel and keyboard go to the page by themselves. Get the browser element for loadBrowserURL with guiGetBrowser.
Syntax
gui-browser guiCreateBrowser(float x, float y, float width, float height, bool isLocal, bool isTransparent, bool relative [, element parent = nil])Arguments
xfloat- X position.
yfloat- Y position.
widthfloat- Width.
heightfloat- Height.
isLocalbool- Local page (resource files).
isTransparentbool- Transparent background.
relativebool- Relative values.Optional in MTA:SA: bool isRelative = false
parentelement, optional = nil- Parent.
Differences from MTA:SA
- Arguments in a different colour differ from MTA:SA.
In MTA:SA
guiCreateBrowser(float x, float y, float width, float height, bool isLocal, bool isTransparent, bool isRelative = false, gui-element parent = nil)Returns
The browser control.
Example
local win = guiCreateWindow(100, 100, 820, 640, "Pomoc", false)
local gb = guiCreateBrowser(10, 35, 800, 595, true, false, false, win)
local browser = guiGetBrowser(gb)
addEventHandler("onClientBrowserCreated", browser, function()
loadBrowserURL(source, "http://trilogy/local/help.html")
end)