IsMTAWindowFocused

From Multi Theft Auto: Wiki
Revision as of 15:06, 8 October 2022 by LopSided (talk | contribs) (Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0160|1.5.9|21313| This function returns whether the MTA window is focused or not.}} ==Syntax== <syntaxhighlight lang="lua"> bool isMTAWindowFocused() </syntaxhighlight> ===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'') <syntaxhighlight lang="lua"> function getWindowFocus()...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

This template will be deleted.

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