mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#233 - Clean up mDAGR interaction menu
Adds exception to use on map (also for base ACE_equipment) selfInteract has 3 options [close, show minimap, show dialog] (only 2 possible shown at any time) Keybinds are just toggle and close
This commit is contained in:
parent
5e79970740
commit
3ab033065f
@ -405,6 +405,7 @@ class CfgVehicles {
|
||||
icon = ""; // @todo
|
||||
enableInside = 1;
|
||||
hotkey = "E";
|
||||
exceptions[] = {"notOnMap"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,23 +3,34 @@ class CfgVehicles {
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(openMicroDAGR) {
|
||||
displayName = "$STR_ACE_microdagr_openUnit";
|
||||
condition = QUOTE(('ACE_microDAGR' in (items _player)));
|
||||
statement = QUOTE([] call FUNC(openDisplay));
|
||||
class GVAR(show) {
|
||||
//Opens the mini map
|
||||
displayName = "$STR_ACE_microdagr_show";
|
||||
condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY});
|
||||
statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay));
|
||||
showDisabled = 0;
|
||||
priority = 0.2;
|
||||
icon = QUOTE(PATHTOF(data\icon_microDAGR.paa));
|
||||
exceptions[] = {"notOnMap"};
|
||||
};
|
||||
class GVAR(configure) {
|
||||
//Opens the dialog
|
||||
displayName = "$STR_ACE_microdagr_configure";
|
||||
condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG});
|
||||
statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay));
|
||||
showDisabled = 0;
|
||||
priority = 0.1;
|
||||
icon = QUOTE(PATHTOF(data\icon_microDAGR.paa));
|
||||
hotkey = "G";
|
||||
};
|
||||
class GVAR(closeMicroDAGR) {
|
||||
exceptions[] = {"notOnMap"};
|
||||
};
|
||||
class GVAR(close) {
|
||||
displayName = "$STR_ACE_microdagr_closeUnit";
|
||||
condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED);
|
||||
statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay));
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
priority = 0.3;
|
||||
icon = QUOTE(PATHTOF(data\icon_microDAGR.paa));
|
||||
// hotkey = "G";
|
||||
exceptions[] = {"notOnMap"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -4,14 +4,14 @@
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
//Add Keybinds:
|
||||
["ACE3", QGVAR(openGPS), (localize "STR_ACE_microdagr_openUnit"),
|
||||
["ACE3", QGVAR(openGPS), (localize "STR_ACE_microdagr_toggleUnit"),
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// canInteractWith (can use on map)
|
||||
if !([ACE_player, objNull, ["notOnMap"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!("ACE_microDAGR" in (items ace_player))) exitWith {false};
|
||||
[] call FUNC(openDisplay);
|
||||
|
||||
[] call FUNC(openDisplay); //toggle display mode
|
||||
true;
|
||||
},
|
||||
{false},
|
||||
@ -19,14 +19,13 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
["ACE3", QGVAR(closeGPS), (localize "STR_ACE_microdagr_closeUnit"),
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// canInteractWith (can use on map)
|
||||
if !([ACE_player, objNull, ["notOnMap"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!("ACE_microDAGR" in (items ace_player))) exitWith {false};
|
||||
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {false};
|
||||
|
||||
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay);
|
||||
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay); //close unit
|
||||
true;
|
||||
},
|
||||
{false},
|
||||
|
@ -9,7 +9,7 @@
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_microdagr_fnc_canShow
|
||||
* [mode] call ace_microdagr_fnc_canShow
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -17,13 +17,21 @@
|
||||
|
||||
PARAMS_1(_showType);
|
||||
|
||||
//Can always do closed or hidden
|
||||
if (_showType in [DISPLAY_MODE_CLOSED, DISPLAY_MODE_HIDDEN]) exitWith {true};
|
||||
private ["_returnValue"];
|
||||
|
||||
//Can't interact then hide gps: TODO: any exceptions?
|
||||
if (!([ACE_player, objNull, []] call EGVAR(common,canInteractWith))) exitWith {false};
|
||||
_returnValue = false;
|
||||
|
||||
//Can't have minimap up while zoomed in
|
||||
if ((_showType == DISPLAY_MODE_DISPLAY) && {cameraview == "GUNNER"}) exitWith {false};
|
||||
switch (_showType) do {
|
||||
case (DISPLAY_MODE_CLOSED): {_returnValue = true}; //Can always close
|
||||
case (DISPLAY_MODE_HIDDEN): {_returnValue = true}; //Can always hide
|
||||
|
||||
true
|
||||
case (DISPLAY_MODE_DIALOG): {
|
||||
_returnValue = ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap"]] call EFUNC(common,canInteractWith)};
|
||||
};
|
||||
case (DISPLAY_MODE_DISPLAY): {
|
||||
//Can't have minimap up while zoomed in
|
||||
_returnValue = (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap"]] call EFUNC(common,canInteractWith)};
|
||||
};
|
||||
};
|
||||
|
||||
_returnValue
|
||||
|
@ -21,6 +21,7 @@ DEFAULT_PARAM(0,_newDisplayShowMode,-1);
|
||||
_oldShowMode = GVAR(currentShowMode);
|
||||
|
||||
if (_newDisplayShowMode == -1) then {
|
||||
//Toggle mode button:
|
||||
if (_oldShowMode in [DISPLAY_MODE_DISPLAY, DISPLAY_MODE_HIDDEN]) then {_newDisplayShowMode = DISPLAY_MODE_DIALOG};
|
||||
if (_oldShowMode in [DISPLAY_MODE_DIALOG, DISPLAY_MODE_CLOSED]) then {_newDisplayShowMode = DISPLAY_MODE_DISPLAY};
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2015-03-10 -->
|
||||
<!-- Edited with tabler - 2015-03-24 -->
|
||||
<Project name="ACE">
|
||||
<Package name="microdagr">
|
||||
<Key ID="STR_ACE_microdagr_itemName">
|
||||
@ -42,12 +42,6 @@
|
||||
<Russian>Выкл.</Russian>
|
||||
<Spanish>No</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_microdagr_openUnit">
|
||||
<English>Open MicroDAGR</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_microdagr_closeUnit">
|
||||
<English>Close MicroDAGR</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_microdagr_wpEnterCords">
|
||||
<English>Enter Grid Cords:</English>
|
||||
</Key>
|
||||
@ -89,15 +83,27 @@
|
||||
<English>Add</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_microdagr_waypointsDelete">
|
||||
<English>Delete</English>
|
||||
<Czech>Smazat</Czech>
|
||||
<French>Supprimer</French>
|
||||
<German>Löschen</German>
|
||||
<Italian>Elimina</Italian>
|
||||
<Polish>Usuń</Polish>
|
||||
<Portuguese>Excluir</Portuguese>
|
||||
<Russian>Удалить</Russian>
|
||||
<Spanish>Suprimir</Spanish>
|
||||
<English>Delete</English>
|
||||
<Czech>Smazat</Czech>
|
||||
<French>Supprimer</French>
|
||||
<German>Löschen</German>
|
||||
<Italian>Elimina</Italian>
|
||||
<Polish>Usuń</Polish>
|
||||
<Portuguese>Excluir</Portuguese>
|
||||
<Russian>Удалить</Russian>
|
||||
<Spanish>Suprimir</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_microdagr_toggleUnit">
|
||||
<English>Toggle MicroDAGR Display Mode</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_microdagr_show">
|
||||
<English>Show MicoDAGR</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_microdagr_configure">
|
||||
<English>Configure MicroDAGR</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_microdagr_closeUnit">
|
||||
<English>Close MicroDAGR</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user