guiCreateBrowser | Multi Theft Auto: Wiki Skip to content

guiCreateBrowser

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function creates a new CEGUI web browser element.

The difference between this and createBrowser is that this function handles inputs internally, and it can be attached to GUI windows. So the createBrowser function is more suitable for custom dx based interfaces, while this one is favorable for CEGUI all-in-all integration. You can learn more about the differences [here].

Syntax

guiCreateBrowser ( )

Code Examples

client

This examples simply creates a web browser and loads an URL

local browserGUI = guiCreateBrowser(100, 100, 300, 50, true, true, false)
local browser = guiGetBrowser(browserGUI)
addEventHandler("onClientBrowserCreated", browser, function()
loadBrowserURL(browser, "http://mta/local/html/index.html")
end)

See Also

GUI Functions