isUIContext

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.76
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.76

Description

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

Syntax:
isUIContext
Return Value:
Boolean

Examples

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

Additional Information

Multiplayer:
-
See also:
canSuspendisRemoteExecutedisRemoteExecutedJIP

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section

Posted on September 12, 2017 - 12:46 (UTC)
Demellion
NOTE: The invocation source never reccur to a newly generated threads (e.g. spawn, execVM, remoteExec).Example with RscButton: _button ctrlSetEventHandler ['ButtonClick',"0 call {systemChat str(isUIContext)}"]; // Will return as true _button ctrlSetEventHandler ['ButtonClick',"0 spawn {systemChat str(isUIContext)}"]; // Will always return false