IsMTAWindowFocused

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This function returns whether the MTA window is focused or not.

Syntax

bool isMTAWindowFocused()

Returns

Returns true if the focus is on the MTA window, false if not.

Example

This example prints the window focus state to debug output upon usage of the command (focused)

function getWindowFocus()
    iprint(isMTAWindowFocused() and "focused" or "not focused")
end
addCommandHandler("focused", getWindowFocus)

Requirements

Minimum server version n/a
Minimum client version 1.5.9-9.21313

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.9-9.21313" />

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI