isUIContext: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|= Game version" to "|Game version=") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(24 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma3 | | |game1= arma3 | ||
|version1= 1.76 | |||
|gr1= GUI Control | |||
| | |gr2= Program Flow | ||
| | |descr= Returns [[true]] if the script originated from some UI control event, for example from "onButtonDown" EH. Exists within parent scope and immediate child scopes. | ||
| [[ | |s1= [[isUIContext]] | ||
|r1= [[Boolean]] | |||
|x1= < | |x1= <sqf>if (isUIContext) then { hint "UI control event" };</sqf> | ||
| [ | |x2= <sqf>_button ctrlSetEventHandler ["ButtonDown", "call { diag_log isUIContext }"]; // outputs true</sqf> | ||
| | |x3= <sqf>_button ctrlSetEventHandler ["ButtonDown", "0 spawn { diag_log isUIContext }"]; // outputs false</sqf> | ||
|seealso= [[canSuspend]] [[isRemoteExecuted]] [[isRemoteExecutedJIP]] [[isGamePaused]] [[isGameFocused]] [[serverCommand]] | |||
}} | }} | ||
Latest revision as of 11:49, 6 May 2022
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:
- Example 2:
- Example 3:
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