Add keybind to toggle interaction menu (#5095)

This commit is contained in:
PabstMirror 2017-05-05 13:20:54 -05:00 committed by GitHub
parent 8dde674105
commit c001be5b09
2 changed files with 35 additions and 0 deletions

View File

@ -941,5 +941,19 @@
<Russian>Нет места для выгрузки</Russian> <Russian>Нет места для выгрузки</Russian>
<Japanese>降ろすための空間がありません</Japanese> <Japanese>降ろすための空間がありません</Japanese>
</Key> </Key>
<Key ID="STR_ACE_Common_KeybindToggle">
<English>Toggle</English>
<Polish>переключить</Polish>
<Russian>переключить</Russian>
<French>Basculer</French>
<Spanish>Cambiar</Spanish>
<Italian>camb.</Italian>
<German>Umschalten</German>
<Hungarian>pecek</Hungarian>
<Czech>přep.</Czech>
<Portuguese>alternar</Portuguese>
<Japanese>トグル</Japanese>
<Korean>토글</Korean>
</Key>
</Package> </Package>
</Project> </Project>

View File

@ -42,6 +42,27 @@ GVAR(ParsedTextCached) = [];
[219, [false, true, false]], false] call CBA_fnc_addKeybind; //Left Windows Key + Ctrl/Strg [219, [false, true, false]], false] call CBA_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
["ACE3 Common", QGVAR(InteractKey_Toggle),
format ["%1 (%2)", (localize LSTRING(InteractKey)), localize ELSTRING(common,KeybindToggle)],
{
if (GVAR(openedMenuType) != 0) then {
[0] call FUNC(keyDown)
} else {
[0,false] call FUNC(keyUp)
};
}, {}, [-1, [false, false, false]], false] call CBA_fnc_addKeybind; // UNBOUND
["ACE3 Common", QGVAR(SelfInteractKey_Toggle),
format ["%1 (%2)", (localize LSTRING(SelfInteractKey)), localize ELSTRING(common,KeybindToggle)],
{
if (GVAR(openedMenuType) != 1) then {
[1] call FUNC(keyDown)
} else {
[1, false] call FUNC(keyUp)
};
}, {}, [-1, [false, false, false]], false] call CBA_fnc_addKeybind; // UNBOUND
// Listens for the falling unconscious event, just in case the menu needs to be closed // Listens for the falling unconscious event, just in case the menu needs to be closed
["ace_unconscious", { ["ace_unconscious", {
// If no menu is open just quit // If no menu is open just quit