isUIContext: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *(arg|eff|mp|serverExec|gr[0-9]) *= *(.*) * *\|([^=0-9]{12})" to "|$1=$2 |descr=$3") |
Lou Montana (talk | contribs) m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ") |
||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma3 | |game1= arma3 | ||
|1.76 | |version1= 1.76 | ||
|gr1= GUI Control | |gr1= GUI Control |
Revision as of 23:25, 13 June 2021
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:
- GUI ControlProgram Flow
Syntax
- Syntax:
- isUIContext
- Return Value:
- 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',"[] spawn {diag_log isUIContext}"]; // Outputs false
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