ACE3/addons/common/functions/fnc_setDisableUserInputStatus.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

34 lines
746 B
Plaintext

/*
* Author: Glowbal
* Disables the user input. Works stacked.
*
* Arguments:
* 0: id <STRING>
* 1: disable <BOOL>
*
* Return Value:
* None
*
* Example:
* ["id", true] call ace_common_fnc_setDisableUserInputStatus
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_id", "_disable"];
if (isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
GVAR(DISABLE_USER_INPUT_COLLECTION) = [];
};
if (_disable) then {
GVAR(DISABLE_USER_INPUT_COLLECTION) pushBack _id;
[true] call FUNC(disableUserInput);
} else {
GVAR(DISABLE_USER_INPUT_COLLECTION) = GVAR(DISABLE_USER_INPUT_COLLECTION) - [_id];
if (GVAR(DISABLE_USER_INPUT_COLLECTION) isEqualTo []) then {
[false] call FUNC(disableUserInput);
};
};