isUIContext: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|M...) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma3 | |game1= arma3 | ||
|1.76 | |version1= 1.76 | ||
|gr1= GUI Control | |gr1= GUI Control | ||
Line 8: | Line 8: | ||
|gr2= Program Flow | |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= <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> | ||
| [[canSuspend]] | |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