isUIContext: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 10: | Line 10: | ||
|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. | |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= | |s1= [[isUIContext]] | ||
|r1= [[Boolean]] | |r1= [[Boolean]] | ||
|x1= < | |x1= <sqf>if (isUIContext) then { hint "UI control event" };</sqf> | ||
|x2= < | |||
|x3= < | |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]] | |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