2015-10-14 22:26:31 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-10-26 15:49:39 +00:00
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
|
2016-03-29 14:25:55 +00:00
|
|
|
// Add keybinds
|
2016-03-29 14:03:41 +00:00
|
|
|
{
|
2016-03-29 14:25:55 +00:00
|
|
|
_x params ["_currentName", "_key", ["_vanillaKey", false] ];
|
2016-03-29 14:03:41 +00:00
|
|
|
|
|
|
|
// Don't add "ace_gestures_" prefix to BI gestures
|
2016-04-21 18:21:55 +00:00
|
|
|
private _signalName = if (_vanillaKey) then {
|
|
|
|
format ["BIgesture%1", _currentName];
|
2016-04-21 18:15:35 +00:00
|
|
|
} else {
|
2016-04-21 18:21:55 +00:00
|
|
|
format [QGVAR(%1), _currentName];
|
2016-03-29 14:03:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName];
|
2016-09-07 19:07:51 +00:00
|
|
|
if (_currentName == "Stop") then {
|
|
|
|
_code = compile format [QUOTE('%1' call FUNC(playSignal)), "BIgestureFreeze"];
|
|
|
|
};
|
2016-03-29 14:03:41 +00:00
|
|
|
|
|
|
|
TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key);
|
|
|
|
|
|
|
|
[
|
|
|
|
"ACE3 Gestures",
|
|
|
|
_currentName,
|
|
|
|
localize format [LSTRING(%1), _currentName],
|
|
|
|
_code,
|
|
|
|
{false},
|
|
|
|
[_key, [false, (_key != -1), false]],
|
|
|
|
false
|
|
|
|
] call CBA_fnc_addKeybind;
|
|
|
|
|
|
|
|
false
|
|
|
|
} count [
|
|
|
|
["Freeze", 80], // Numpad 2
|
|
|
|
["Cover", 81], // Numpad 3
|
|
|
|
["Forward", 75], // Numpad 4
|
|
|
|
["Regroup", 76], // Numpad 5
|
|
|
|
["Engage", 77], // Numpad 6
|
|
|
|
["Point", 71], // Numpad 7
|
|
|
|
["Hold", 72], // Numpad 8
|
|
|
|
["Warning", 73], // Numpad 9
|
2016-03-29 14:25:55 +00:00
|
|
|
["Go", -1, true],
|
|
|
|
["Advance", -1, true],
|
|
|
|
["Follow", -1, true],
|
|
|
|
["Up", -1, true],
|
|
|
|
["Stop", -1, true],
|
|
|
|
["CeaseFire", -1, true]
|
2016-03-29 14:03:41 +00:00
|
|
|
];
|