HU/isBrowserFocused
Jump to navigation
Jump to search
This function checks if a browser is focused.
Syntax
bool isBrowserFocused ( browser webBrowser )
OOP Syntax Help! I don't understand this!
- Method: browser:isFocused(...)
Required arguments
- webBrowser: The browser
Returns
Returns true if the browser is focused, false otherwise and nil if invalid arguments were passed.
Example
This example creates a browser. If you press left control it will output to chatbox if the browser is focused or not.
Click to collapse [-]
Examplelocal theBrowser = guiCreateBrowser ( 150, 150, 1280, 720, true, false, false) addEventHandler("onClientKey", localPlayer, function(button, state) -- adds the event handler. if button == "lctrl" and state = "down" then -- if the pressed key is lctrl and the state is down then we will check is the browser focused or not. if isBrowserFocused(theBrowser) then outputChatbox("the browser is focused.") -- if the browser is focused then we will write this to chatbox. else outputChatbox("the browser is not focused.")-- if the browser is not focused then we will write this to chatbox. end end end )
Lásd még
- HU/canBrowserNavigateBack
- HU/canBrowserNavigateForward
- HU/createBrowser
- HU/executeBrowserJavascript
- HU/focusBrowser
- HU/getBrowserProperty
- HU/getBrowserSettings
- HU/getBrowserSource
- HU/getBrowserTitle
- HU/getBrowserURL
- HU/injectBrowserMouseDown
- HU/injectBrowserMouseMove
- HU/injectBrowserMouseUp
- HU/injectBrowserMouseWheel
- HU/isBrowserDomainBlocked
- HU/isBrowserFocused
- HU/isBrowserLoading
- HU/loadBrowserURL
- HU/navigateBrowserBack
- HU/navigateBrowserForward
- HU/reloadBrowserPage
- HU/requestBrowserDomains
- HU/resizeBrowser
- HU/setBrowserAjaxHandler
- HU/setBrowserProperty
- HU/setBrowserRenderingPaused
- HU/setBrowserVolume
- HU/toggleBrowserDevTools
GUI Függvények