isUIContext

From Bohemia Interactive Community
Revision as of 14:46, 12 September 2017 by Demellion (talk | contribs)
Jump to navigation Jump to search
Hover & click on the images for description

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.
Groups:
Uncategorised

Syntax

Syntax:
isUIContext
Return Value:
Boolean

Examples

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

Additional Information

See also:
canSuspendisRemoteExecutedisRemoteExecutedJIP

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

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