userInputDisabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(dev version cannot be 1.58, format)
(Add stack example, thanks OverlordZorn)
 
(30 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3dev |= Game name
|game1= arma3
|version1= 1.60


|1.59 |= Game version
|gr1= Interaction
____________________________________________________________________________________________


| Returns true if user input is disabled |= Description
|descr= Returns whether or not user input is disabled.
____________________________________________________________________________________________
{{Feature|important|The disabled input system internally ''counts'' how many times <sqf inline>disableUserInput true</sqf> has been called - see {{Link|#Example 2}}.}}
| '''userInputDisabled'''|= Syntax


| [[Boolean]]|= Return value
|s1= [[userInputDisabled]]
____________________________________________________________________________________________
 
|x1= <code>[[if]] (![[userInputDisabled]]) [[then]]
{
  [[disableUserInput]] [[true]];
}
[[else]]
{
  [[disableUserInput]] [[false]];
};</code> |= Example 1
____________________________________________________________________________________________


| [[disableUserInput]] |= See also
|r1= [[Boolean]]


|x1= Toggles user input<sqf>disableUserInput !userInputDisabled;</sqf>
|x2= <sqf>
disableUserInput true;
disableUserInput true;
disableUserInput true;
diag_log str userInputDisabled; // true
disableUserInput false;
diag_log str userInputDisabled; // true
disableUserInput false;
diag_log str userInputDisabled; // true
disableUserInput false;
diag_log str userInputDisabled; // false - control is regained only here
</sqf>
|seealso= [[disableUserInput]]
}}
}}

Latest revision as of 19:38, 3 March 2025

Hover & click on the images for description

Description

Description:
Returns whether or not user input is disabled.
The disabled input system internally counts how many times disableUserInput true has been called - see Example 2.
Groups:
Interaction

Syntax

Syntax:
userInputDisabled
Return Value:
Boolean

Examples

Example 1:
Toggles user input
disableUserInput !userInputDisabled;
Example 2:
disableUserInput true; disableUserInput true; disableUserInput true; diag_log str userInputDisabled; // true disableUserInput false; diag_log str userInputDisabled; // true disableUserInput false; diag_log str userInputDisabled; // true disableUserInput false; diag_log str userInputDisabled; // false - control is regained only here

Additional Information

See also:
disableUserInput

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