Arma 3 Scripting

Command in GUI Control, Program Flow

isUIContext

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns true if the script originated from some UI control event, for example from "onButtonDown" EH. Exists within parent scope and immediate child scopes.

Syntax

isUIContext

Returns: Boolean

Examples

Example 1

if (isUIContext) then { hint "UI control event" };

Example 2

_button ctrlSetEventHandler ["ButtonDown", "call { diag_log isUIContext }"]; // outputs true

Example 3

_button ctrlSetEventHandler ["ButtonDown", "0 spawn { diag_log isUIContext }"]; // outputs false

See also

canSuspend · isRemoteExecuted · isRemoteExecutedJIP · isGamePaused · isGameFocused · serverCommand