Add Ctrl+F search shortcut for ACE Arsenal (#5910)

* Add Ctrl+F search shortcut

* Add ctrl+A and ctrl+x support to search boxes
This commit is contained in:
Josuan Albin 2017-12-16 19:33:41 +01:00 committed by PabstMirror
parent e6683e8077
commit af09fc652a

View File

@ -46,6 +46,10 @@ if (!GVAR(leftSearchbarFocus) && {!GVAR(rightSearchbarFocus)}) then {
case (_keyPressed == DIK_V && {_ctrlState}): { case (_keyPressed == DIK_V && {_ctrlState}): {
[_display] call FUNC(buttonImport); [_display] call FUNC(buttonImport);
}; };
// Search fields
case (_keyPressed == DIK_F && {_ctrlState}): {
ctrlSetFocus (_display displayCtrl IDC_leftSearchbar);
};
// Switch vision mode // Switch vision mode
case (_keyPressed in (actionkeys "nightvision")): { case (_keyPressed in (actionkeys "nightvision")): {
if (isNil QGVAR(visionMode)) then { if (isNil QGVAR(visionMode)) then {
@ -99,6 +103,20 @@ if (!GVAR(leftSearchbarFocus) && {!GVAR(rightSearchbarFocus)}) then {
case (_keyPressed == DIK_V && {_ctrlState}): { case (_keyPressed == DIK_V && {_ctrlState}): {
_return = false; _return = false;
}; };
case (_keyPressed == DIK_A && {_ctrlState}): {
_return = false;
};
case (_keyPressed == DIK_X && {_ctrlState}): {
_return = false;
};
// Search fields
case (_keyPressed == DIK_F && {_ctrlState}): {
if (GVAR(rightSearchbarFocus)) then {
ctrlSetFocus (_display displayCtrl IDC_leftSearchbar);
} else {
ctrlSetFocus (_display displayCtrl IDC_rightSearchbar);
};
};
}; };
}; };