Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keybind to toggle interaction menu #5095

Merged
merged 1 commit into from May 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions addons/common/stringtable.xml
Expand Up @@ -940,6 +940,20 @@
<Portuguese>Sem espaço para descarregar</Portuguese>
<Russian>Нет места для выгрузки</Russian>
<Japanese>降ろすための空間がありません</Japanese>
</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>
</Project>
21 changes: 21 additions & 0 deletions addons/interact_menu/XEH_clientInit.sqf
Expand Up @@ -42,6 +42,27 @@ GVAR(ParsedTextCached) = [];
[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
["ace_unconscious", {
// If no menu is open just quit
Expand Down