mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
NVG KeyBinds
This commit is contained in:
parent
d3f4f2883f
commit
c3b5430bc4
@ -35,3 +35,40 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
|||||||
["cameraViewChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
|
["cameraViewChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
|
||||||
["playerVehicleChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
|
["playerVehicleChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
|
||||||
["playerTurretChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
|
["playerTurretChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
|
// Add keybinds
|
||||||
|
["ACE3",
|
||||||
|
localize "STR_ACE_NightVision_IncreaseNVGBrightness",
|
||||||
|
{
|
||||||
|
// Conditions: canInteract
|
||||||
|
_exceptions = [QEGVAR(captives,isNotEscorting)];
|
||||||
|
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||||
|
// Conditions: specific
|
||||||
|
if ((currentVisionMode _player != 1)) exitWith {false};
|
||||||
|
|
||||||
|
// Statement
|
||||||
|
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
||||||
|
true
|
||||||
|
},
|
||||||
|
[201, [false, false, true]], //PageUp + ALT
|
||||||
|
false,
|
||||||
|
"keydown"
|
||||||
|
] call cba_fnc_registerKeybind;
|
||||||
|
|
||||||
|
["ACE3",
|
||||||
|
localize "STR_ACE_NightVision_DecreaseNVGBrightness",
|
||||||
|
{
|
||||||
|
// Conditions: canInteract
|
||||||
|
_exceptions = [QEGVAR(captives,isNotEscorting)];
|
||||||
|
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||||
|
// Conditions: specific
|
||||||
|
if ((currentVisionMode _player != 1)) exitWith {false};
|
||||||
|
|
||||||
|
// Statement
|
||||||
|
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
||||||
|
true
|
||||||
|
},
|
||||||
|
[209, [false, false, true]], //PageDown + ALT
|
||||||
|
false,
|
||||||
|
"keydown"
|
||||||
|
] call cba_fnc_registerKeybind;
|
||||||
|
@ -15,28 +15,3 @@ class CfgPatches {
|
|||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
|
|
||||||
|
|
||||||
// class EGVAR(common,Default_Keys) { //???
|
|
||||||
class ACE_common_Default_Keys {
|
|
||||||
class increaseNVGBrightness {
|
|
||||||
displayName = "$STR_ACE_NightVision_IncreaseNVGBrightness";
|
|
||||||
condition = QUOTE( currentVisionMode _player == 1 );
|
|
||||||
statement = QUOTE( [_player, _vehicle] call FUNC(increaseNVGBrightness) );
|
|
||||||
key = 201;
|
|
||||||
shift = 0;
|
|
||||||
control = 0;
|
|
||||||
alt = 1;
|
|
||||||
allowHolding = 1;
|
|
||||||
};
|
|
||||||
class decreaseNVGBrightness {
|
|
||||||
displayName = "$STR_ACE_NightVision_DecreaseNVGBrightness";
|
|
||||||
condition = QUOTE( currentVisionMode _player == 1 );
|
|
||||||
statement = QUOTE( [_player, _vehicle] call FUNC(decreaseNVGBrightness) );
|
|
||||||
key = 209;
|
|
||||||
shift = 0;
|
|
||||||
control = 0;
|
|
||||||
alt = 1;
|
|
||||||
allowHolding = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user