mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
34 lines
674 B
Plaintext
34 lines
674 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Brandon (TCVM)
|
|
* Handle key presses
|
|
*
|
|
* Arguments:
|
|
* 0: Key Pressed <NUMBER>
|
|
* 1: Down <BOOL>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [5, true] call ace_spike_keyDown;
|
|
*
|
|
* Public: No
|
|
*/
|
|
params ["_key", "_down"];
|
|
|
|
if (_key == SPIKE_KEY_DESIGNATE) then {
|
|
if (cameraView == "GUNNER") then {
|
|
playSound "ACE_Sound_Click";
|
|
};
|
|
private _designateInput = 0;
|
|
if (_down) then {
|
|
_designateInput = 1;
|
|
} else {
|
|
_designateInput = 0;
|
|
};
|
|
(uiNamespace getVariable "ACE_RscOptics_spike") setVariable [QGVAR(designate), _designateInput];
|
|
};
|
|
|
|
_this call FUNC(camera_handleKeyPress);
|