ACE3/addons/gestures/XEH_postInit.sqf

50 lines
1.3 KiB
Plaintext
Raw Normal View History

#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:25:55 +00:00
_x params ["_currentName", "_key", ["_vanillaKey", false] ];
// 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];
} else {
2016-04-21 18:21:55 +00:00
format [QGVAR(%1), _currentName];
};
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"];
};
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]
];