2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-09-19 18:34:07 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Disables the user input. Works stacked.
|
2015-01-16 23:21:47 +00:00
|
|
|
*
|
2015-09-19 18:34:07 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: id <STRING>
|
|
|
|
* 1: disable <BOOL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* ["id", true] call ace_common_fnc_setDisableUserInputStatus
|
|
|
|
*
|
2015-09-19 18:34:07 +00:00
|
|
|
* Public: Yes
|
2015-01-16 23:21:47 +00:00
|
|
|
*/
|
|
|
|
|
2015-09-19 18:34:07 +00:00
|
|
|
params ["_id", "_disable"];
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-09-19 18:34:07 +00:00
|
|
|
if (isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
2015-02-14 19:29:07 +00:00
|
|
|
GVAR(DISABLE_USER_INPUT_COLLECTION) = [];
|
2015-01-16 23:21:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
if (_disable) then {
|
2015-09-19 18:34:07 +00:00
|
|
|
GVAR(DISABLE_USER_INPUT_COLLECTION) pushBack _id;
|
2015-01-18 19:09:19 +00:00
|
|
|
[true] call FUNC(disableUserInput);
|
2015-01-16 23:21:47 +00:00
|
|
|
} else {
|
2015-02-14 19:29:07 +00:00
|
|
|
GVAR(DISABLE_USER_INPUT_COLLECTION) = GVAR(DISABLE_USER_INPUT_COLLECTION) - [_id];
|
|
|
|
if (GVAR(DISABLE_USER_INPUT_COLLECTION) isEqualTo []) then {
|
2015-01-18 19:09:19 +00:00
|
|
|
[false] call FUNC(disableUserInput);
|
|
|
|
};
|
2015-09-19 18:34:07 +00:00
|
|
|
};
|