mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
f5782fd1ff
* Medical - Various debugging and fix cpr anim speed * Update fnc_setCardiacArrest.sqf
35 lines
828 B
Plaintext
35 lines
828 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* 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
|
|
*/
|
|
|
|
params [["_id", "#", [""]], ["_disable", false, [false]]];
|
|
TRACE_2("setDisableUserInputStatus",_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);
|
|
};
|
|
};
|