From 97b80d9ae2f1fb0aa5e194e8baeb85951ff5f073 Mon Sep 17 00:00:00 2001 From: Steve Zhao Date: Thu, 30 Mar 2023 23:41:59 -0400 Subject: [PATCH 1/2] hint icons --- addons/editor/initKeybinds.sqf | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/addons/editor/initKeybinds.sqf b/addons/editor/initKeybinds.sqf index d4c3c908e..eab1a9aea 100644 --- a/addons/editor/initKeybinds.sqf +++ b/addons/editor/initKeybinds.sqf @@ -229,26 +229,19 @@ { if (!isPlayer _x && {_x == vehicle _x || {_x == driver vehicle _x}}) then { private _isPathEnabled = _x checkAIFeature "PATH"; - private _eventName = [QEGVAR(common,enableAI), QEGVAR(common,disableAI)] select _isPathEnabled; - [_eventName, [_x, "PATH"], _x] call CBA_fnc_globalEvent; - if (_isPathEnabled) then { - _disabled = _disabled + 1; - } else { - _enabled = _enabled + 1; - }; + [ + [QEGVAR(common,enableAI), "\a3\3den\Data\Displays\Display3DEN\PanelRight\modeWaypoints_ca.paa"], + [QEGVAR(common,disableAI), "\a3\3den\Data\CfgWaypoints\hold_ca.paa"] + ] select _isPathEnabled params ["_eventName", "_icon"]; + + [_eventName, [_x, "PATH"]] call CBA_fnc_globalEvent; + [[ + ["ICON", [_x, _icon]] + ], 3, _x] call EFUNC(common,drawHint); }; } forEach SELECTED_OBJECTS; - [ - "%1 - %2: %3 - %4: %5", - LLSTRING(AIPathToggled), - LELSTRING(common,Enabled), - _enabled, - LELSTRING(common,Disabled), - _disabled - ] call EFUNC(common,showMessage); - true // handled }; }, {}, [0, [false, false, false]]] call CBA_fnc_addKeybind; // Default: Unbound From 1ea65c41cc8f121c5854f7d56ac4c1ac14757243 Mon Sep 17 00:00:00 2001 From: mharis001 Date: Fri, 31 Mar 2023 06:09:03 -0400 Subject: [PATCH 2/2] Minor cleanup --- addons/editor/initKeybinds.sqf | 14 ++++++-------- addons/editor/stringtable.xml | 3 --- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/addons/editor/initKeybinds.sqf b/addons/editor/initKeybinds.sqf index eab1a9aea..f45e95d86 100644 --- a/addons/editor/initKeybinds.sqf +++ b/addons/editor/initKeybinds.sqf @@ -223,19 +223,17 @@ [[ELSTRING(main,DisplayName), LSTRING(AIControl)], QGVAR(toggleAIPATH), [LSTRING(ToggleAIPATH), LSTRING(ToggleAIPATH_Description)], { if (!isNull curatorCamera && {!GETMVAR(RscDisplayCurator_search,false)}) then { - private _enabled = 0; - private _disabled = 0; - { if (!isPlayer _x && {_x == vehicle _x || {_x == driver vehicle _x}}) then { private _isPathEnabled = _x checkAIFeature "PATH"; + private _eventName = [QEGVAR(common,enableAI), QEGVAR(common,disableAI)] select _isPathEnabled; + [_eventName, [_x, "PATH"], _x] call CBA_fnc_globalEvent; - [ - [QEGVAR(common,enableAI), "\a3\3den\Data\Displays\Display3DEN\PanelRight\modeWaypoints_ca.paa"], - [QEGVAR(common,disableAI), "\a3\3den\Data\CfgWaypoints\hold_ca.paa"] - ] select _isPathEnabled params ["_eventName", "_icon"]; + private _icon = [ + "\a3\3den\Data\Displays\Display3DEN\PanelRight\modeWaypoints_ca.paa", + "\a3\3den\Data\CfgWaypoints\hold_ca.paa" + ] select _isPathEnabled; - [_eventName, [_x, "PATH"]] call CBA_fnc_globalEvent; [[ ["ICON", [_x, _icon]] ], 3, _x] call EFUNC(common,drawHint); diff --git a/addons/editor/stringtable.xml b/addons/editor/stringtable.xml index d14eb7400..9f31792a4 100644 --- a/addons/editor/stringtable.xml +++ b/addons/editor/stringtable.xml @@ -411,8 +411,5 @@ Makes selected AI units start or stop moving. Does not affect aiming or shooting. Similar to "Hold Position" in RTS games. - - AI Pathing Toggled -