{"name":"isUIContext","title":"isUIContext","type":"command","url":"https://community.bistudio.com/wiki/isUIContext","revid":310464,"updated":"2022-05-06T10:49:54Z","groups":["GUI Control","Program Flow"],"status":"ok","games":{"arma3":"1.76"},"since":"arma3 1.76","arma3_since":"1.76","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.","syntaxes":[{"syntax":"isUIContext","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (isUIContext) then { hint \"UI control event\" };"]},{"code":["_button ctrlSetEventHandler [\"ButtonDown\", \"call { diag_log isUIContext }\"]; // outputs true"]},{"code":["_button ctrlSetEventHandler [\"ButtonDown\", \"0 spawn { diag_log isUIContext }\"]; // outputs false"]}],"see_also":["canSuspend","isRemoteExecuted","isRemoteExecutedJIP","isGamePaused","isGameFocused","serverCommand"]}