- Documentation
- Client functions
- createBrowserWindow
Function
createBrowserWindow
Creates a ready browser window: a control with mouse, wheel and keyboard input, loading the address after start-up, the cursor, keyboard focus and a control lock. Everything is released by destroyElement(window) or by stopping the resource.
Syntax
element, element createBrowserWindow(table options)Arguments
optionstableurl(required),x,y,width,height(full screen by default),isLocal,transparent,cursor,focus,lockControls(true, a list of names or false),onReady(browser).
Returns
The window control and the browser.
Example
local wnd, browser = createBrowserWindow({ url = "ui/sklep.html", width = 900, height = 600 })
bindKey("backspace", "down", function()
if isElement(wnd) then destroyElement(wnd) end
end)
See also
guiCreateBrowserCreates a browser as a GUI control. Mouse, wheel and keyboard go to the page by themselves. Get the browser element forloadBrowserURLwithguiGetBrowser.setBrowserBackdropRegionsBlurs the game behind the given rectangles of the page (a glass effect). An empty list ornilturns it off. Without regions it costs nothing.