diff --git a/addons/gestures/ACE_Settings.hpp b/addons/gestures/ACE_Settings.hpp index a9e77807c0..8ed8aedb6b 100644 --- a/addons/gestures/ACE_Settings.hpp +++ b/addons/gestures/ACE_Settings.hpp @@ -4,8 +4,8 @@ class ACE_Settings { typeName = "SCALAR"; isClientSettable = 1; category = ECSTRING(interact_menu,Category_InteractionMenu); - displayName = CSTRING(showOnInteractionMenu_displayName); - description = CSTRING(showOnInteractionMenu_description); - values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(justKeybinds), CSTRING(keysAndInteractionMenu)}; + displayName = CSTRING(ShowOnInteractionMenu_displayName); + description = CSTRING(ShowOnInteractionMenu_description); + values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(JustKeybinds), CSTRING(KeysAndInteractionMenu)}; }; }; diff --git a/addons/gestures/CfgVehicles.hpp b/addons/gestures/CfgVehicles.hpp index d3c7b5ca21..4bf98f4978 100644 --- a/addons/gestures/CfgVehicles.hpp +++ b/addons/gestures/CfgVehicles.hpp @@ -12,131 +12,104 @@ class CfgVehicles { icon = PATHTOF(UI\gestures_ca.paa); class GVAR(Advance) { - displayName = CSTRING(BIgestureAdvance); + displayName = CSTRING(Advance); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureAdvance';); showDisabled = 1; priority = 1.9; }; class GVAR(Go) { - displayName = CSTRING(BIgestureGo); + displayName = CSTRING(Go); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2);); showDisabled = 1; priority = 1.8; }; class GVAR(Follow) { - displayName = CSTRING(BIgestureFollow); + displayName = CSTRING(Follow); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureFollow';); showDisabled = 1; priority = 1.7; }; class GVAR(Up) { - displayName = CSTRING(BIgestureUp); + displayName = CSTRING(Up); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureUp';); showDisabled = 1; priority = 1.5; }; class GVAR(CeaseFire) { - displayName = CSTRING(BIgestureCeaseFire); + displayName = CSTRING(CeaseFire); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureCeaseFire';); showDisabled = 1; priority = 1.3; }; - class GVAR(Freeze) { - displayName = CSTRING(BIgestureFreeze); + class GVAR(Stop) { + displayName = CSTRING(Stop); condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow 'gestureFreeze';); + statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone showDisabled = 1; priority = 1.2; }; class GVAR(Forward) { - displayName = CSTRING(forward); + displayName = CSTRING(Forward); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal)); showDisabled = 1; priority = 1.9; }; class GVAR(Regroup) { - displayName = CSTRING(regroup); + displayName = CSTRING(Regroup); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal)); showDisabled = 1; priority = 1.8; }; - class GVAR(Stop) { - displayName = CSTRING(stop); + class GVAR(Freeze) { + displayName = CSTRING(Freeze); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); - statement = QUOTE(QUOTE(QGVAR(stop)) call FUNC(playSignal)); + statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal)); showDisabled = 1; priority = 1.7; }; class GVAR(Cover) { - displayName = CSTRING(cover); + displayName = CSTRING(Cover); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal)); showDisabled = 1; priority = 1.6; }; class GVAR(Point) { - displayName = CSTRING(point); + displayName = CSTRING(Point); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal)); showDisabled = 1; priority = 1.5; }; class GVAR(Engage) { - displayName = CSTRING(engage); + displayName = CSTRING(Engage); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal)); showDisabled = 1; priority = 1.4; }; class GVAR(Hold) { - displayName = CSTRING(hold); + displayName = CSTRING(Hold); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal)); showDisabled = 1; priority = 1.3; }; class GVAR(Warning) { - displayName = CSTRING(warning); + displayName = CSTRING(Warning); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal)); showDisabled = 1; priority = 1.2; }; - /* - class class GVAR(Yes) { - displayName = ECSTRING(common,Yes); - condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2);); - showDisabled = 1; - priority = 1.1; - }; - - class class GVAR(No) { - displayName = ECSTRING(common,No); - condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow 'gestureNo';); - showDisabled = 1; - priority = 1.0; - }; - - class class GVAR(Hi) { - displayName = CSTRING(Hi); - condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3);); - showDisabled = 1; - priority = 0.9; - }; - */ - }; - }; }; }; diff --git a/addons/gestures/README.md b/addons/gestures/README.md new file mode 100644 index 0000000000..e224ff6d69 --- /dev/null +++ b/addons/gestures/README.md @@ -0,0 +1,11 @@ +ace_gestures +======== + +Gestures system in interaction menu and keybinds. + + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [jokoho48](https://github.com/jokoho48) diff --git a/addons/gestures/XEH_postInit.sqf b/addons/gestures/XEH_postInit.sqf index 3b4a92164e..b764aeb176 100644 --- a/addons/gestures/XEH_postInit.sqf +++ b/addons/gestures/XEH_postInit.sqf @@ -5,4 +5,44 @@ if (!hasInterface) exitWith {}; // reload mutex, you can't play signal while reloading GVAR(ReloadMutex) = true; -#include "key.sqf" +// Add keybinds +{ + _x params ["_currentName", "_key", ["_vanillaKey", false] ]; + + // Don't add "ace_gestures_" prefix to BI gestures + private _signalName = _currentName; + if (!_vanillaKey) then { + _signalName = format [QGVAR(%1), _currentName]; + }; + + private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName]; + + 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 + ["Go", -1, true], + ["Advance", -1, true], + ["Follow", -1, true], + ["Up", -1, true], + ["Stop", -1, true], + ["CeaseFire", -1, true] +]; diff --git a/addons/gestures/anim/ace_stop.rtm b/addons/gestures/anim/ace_freeze.rtm similarity index 100% rename from addons/gestures/anim/ace_stop.rtm rename to addons/gestures/anim/ace_freeze.rtm diff --git a/addons/gestures/anim/ace_stop_stand_lowered.rtm b/addons/gestures/anim/ace_freeze_stand_lowered.rtm similarity index 100% rename from addons/gestures/anim/ace_stop_stand_lowered.rtm rename to addons/gestures/anim/ace_freeze_stand_lowered.rtm diff --git a/addons/gestures/cfgMovesBasic.hpp b/addons/gestures/cfgMovesBasic.hpp index a708787fd5..50a835abe6 100644 --- a/addons/gestures/cfgMovesBasic.hpp +++ b/addons/gestures/cfgMovesBasic.hpp @@ -1,7 +1,7 @@ class CfgMovesBasic { class ManActions { GVAR(forward) = QGVAR(forward); - GVAR(stop) = QGVAR(stop); + GVAR(freeze) = QGVAR(freeze); GVAR(cover) = QGVAR(cover); GVAR(regroup) = QGVAR(regroup); GVAR(engage) = QGVAR(engage); @@ -10,7 +10,7 @@ class CfgMovesBasic { GVAR(warning) = QGVAR(warningS); GVAR(forwardStandLowered) = QGVAR(forwardStandLowered); - GVAR(stopStandLowered) = QGVAR(stopStandLowered); + GVAR(freezeStandLowered) = QGVAR(freezeStandLowered); GVAR(coverStandLowered) = QGVAR(coverStandLowered); GVAR(regroupStandLowered) = QGVAR(regroupStandLowered); GVAR(engageStandLowered) = QGVAR(engageStandLowered); @@ -22,7 +22,7 @@ class CfgMovesBasic { class Actions { class NoActions: ManActions { GVAR(forward)[] = {QGVAR(forward), "Gesture"}; - GVAR(stop)[] = {QGVAR(stop), "Gesture"}; + GVAR(freeze)[] = {QGVAR(freeze), "Gesture"}; GVAR(cover)[] = {QGVAR(cover), "Gesture"}; GVAR(regroup)[] = {QGVAR(regroup), "Gesture"}; GVAR(engage)[] = {QGVAR(engage), "Gesture"}; @@ -31,7 +31,7 @@ class CfgMovesBasic { GVAR(warning)[] = {QGVAR(warning), "Gesture"}; GVAR(forwardStandLowered)[] = {QGVAR(forwardStandLowered), "Gesture"}; - GVAR(stopStandLowered)[] = {QGVAR(stopStandLowered), "Gesture"}; + GVAR(freezeStandLowered)[] = {QGVAR(freezeStandLowered), "Gesture"}; GVAR(coverStandLowered)[] = {QGVAR(coverStandLowered), "Gesture"}; GVAR(regroupStandLowered)[] = {QGVAR(regroupStandLowered), "Gesture"}; GVAR(engageStandLowered)[] = {QGVAR(engageStandLowered), "Gesture"}; @@ -134,13 +134,13 @@ class CfgGesturesMale { file = QUOTE(PATHTOF(anim\ace_forward_stand_lowered.rtm)); }; - class GVAR(stop): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_stop.rtm)); + class GVAR(freeze): GVAR(forward) { + file = QUOTE(PATHTOF(anim\ace_freeze.rtm)); speed = 0.6; }; - class GVAR(stopStandLowered): GVAR(stop) { - file = QUOTE(PATHTOF(anim\ace_stop_stand_lowered.rtm)); + class GVAR(freezeStandLowered): GVAR(freeze) { + file = QUOTE(PATHTOF(anim\ace_freeze_stand_lowered.rtm)); }; class GVAR(cover): GVAR(forward) { diff --git a/addons/gestures/config.cpp b/addons/gestures/config.cpp index 39cb8f0951..ce60d26545 100644 --- a/addons/gestures/config.cpp +++ b/addons/gestures/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interact_menu"}; author[] = {"joko // Jonas", "Emperias", "Zigomarvin"}; - authorUrl = "https://github.com/commy2/"; + authorUrl = "https://github.com/jokoho48"; VERSION_CONFIG; }; }; diff --git a/addons/gestures/key.sqf b/addons/gestures/key.sqf deleted file mode 100644 index 54d6d50c0c..0000000000 --- a/addons/gestures/key.sqf +++ /dev/null @@ -1,42 +0,0 @@ -#include "\a3\editor_f\Data\Scripts\dikCodes.h" - -{ - _x params ["_currentName","_key"]; - - private _signalName = format [QGVAR(%1), _currentName]; - if (_currentName select [0,2] == "BI") then { - //Don't add "ace_gestures_" prefix to BI gestures - _signalName = _currentName; - }; - - private _code = (compile format [QUOTE('%1' call FUNC(playSignal);), _signalName]); - - 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 [ - ["stop", DIK_NUMPAD2], - ["cover", DIK_NUMPAD3], - ["forward", DIK_NUMPAD4], - ["regroup", DIK_NUMPAD5], - ["engage", DIK_NUMPAD6], - ["point", DIK_NUMPAD7], - ["hold", DIK_NUMPAD8], - ["warning", DIK_NUMPAD9], - ["BIgestureGo", -1], - ["BIgestureAdvance", -1], - ["BIgestureFollow", -1], - ["BIgestureUp", -1], - ["BIgestureFreeze", -1], - ["BIgestureCeaseFire", -1] -]; diff --git a/addons/gestures/stringtable.xml b/addons/gestures/stringtable.xml index 1f008ddae9..56b77e97e9 100644 --- a/addons/gestures/stringtable.xml +++ b/addons/gestures/stringtable.xml @@ -25,7 +25,7 @@ Gestos Gesti - + Advance Vordringen Avanzar @@ -37,7 +37,7 @@ Avançar Avanzare - + Go Los Adelante @@ -49,7 +49,7 @@ Mover-se Muoversi - + Follow Folgen Seguirme @@ -61,7 +61,7 @@ Seguir Seguire - + Up Aufstehen Arriba @@ -73,7 +73,7 @@ Acima Alzarsi - + Cease Fire Feuer einstellen Alto el fuego @@ -85,19 +85,18 @@ Cessar Fogo Cessare il Fuoco - - Point - Zeigen - Señalar - Wskazać - Ukázat - Pointer - Показать направление - Mutat - Apontar - Puntare a + + Stop + Stop + Halt + Stop + Стоп + Parar + Stop + Stop + Detenerse - + Freeze Keine Bewegung Alto @@ -109,20 +108,7 @@ Alto Fermi - - - Stop - Stop - Halt - Stop - Стоп - Parar - Stop - Stop - Detenerse - - - + Cover Deckung Cubrirse @@ -134,8 +120,7 @@ Proteger-se Copertura - - + Rally up Regroupement Sammeln @@ -146,8 +131,7 @@ Raggruppare Reunirse - - + Move forward En avant Vorwärts Bewegen @@ -158,8 +142,7 @@ Muovere avanti Avanzar - - + Engage Angriff Engager @@ -170,8 +153,7 @@ Ingaggiare Atacar - - + Point Pointer Zeigen @@ -182,8 +164,7 @@ Puntare Señalar - - + Hold Tenir Anhalten @@ -194,8 +175,7 @@ Mantenere Esperar - - + Warning Attention Achtung @@ -206,31 +186,7 @@ Attenzione Atención - - Hi - Hallo - Hola - Witaj - Ahoj - Salut - Привет - Helló - Olá - Ciao - - - Attack - Angreifen - Atacar - Do ataku - Zaútočit - Attaquer - Атаковать - Támadás - Atacar - Attaccare - - + Show Gestures On Interaction Menu Zeige Gesten im Interaktionsmenü Zobrazit posunky v interakčním menu @@ -239,7 +195,7 @@ Mostrar gestos en el menú de interacción Afficher les gestes au menu d'interaction. - + Show gestures on the self interaction menu, or just use keybinds, or disable completely Zeige Gesten im Selbst-Interkationsmenü, lege sie auf Schnelltasten, oder deaktiviere sie vollständig. Zobrazit posunky pro vlastní interakční menu, nebo prostě použít klávesové zkratky, nebo to zakázat úplně @@ -248,7 +204,7 @@ Muestror los gestos en el menú de interacción propia, utilizar solo combinación de teclas o desactivarlos completamente Afficher les gestes dans le menu d'interaction personnel, ou seulement utiliser les touches, ou desactiver complètement. - + Just Keybinds Nur Schnelltasten Pouze klávesové zkratky @@ -257,7 +213,7 @@ Solo mediante teclas Seulement les touches - + Keybinds + Interaction Menu Schnelltasten+ Interaktionsmenü Klávesové zkratky + interakční menu