isUIContext: Difference between revisions
Jump to navigation
Jump to search
(1.76 implemented) |
No edit summary |
||
Line 35: | Line 35: | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
<!-- CONTINUE Notes --> | |||
<dl class="command_description"> | |||
<dd class="notedate">Posted on September 12, 2017 - 12:46 (UTC)</dd> | |||
<dt class="note">[[User:Demellion|Demellion]]</dt> | |||
<dd class="note"> | |||
'''NOTE''': The invocation source never reccur to a newly generated threads (e.g. [[spawn]], [[execVM]], [[remoteExec]]).Example with RscButton: | |||
<code>_button ctrlSetEventHandler ['ButtonClick',"0 call {systemChat str(isUIContext)}"]; // Will return as true | |||
_button ctrlSetEventHandler ['ButtonClick',"0 spawn {systemChat str(isUIContext)}"]; // Will always return false | |||
</code> | |||
</dd> | |||
</dl> | |||
<!-- DISCONTINUE Notes --> |
Revision as of 13:46, 12 September 2017
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
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