mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleanup
This commit is contained in:
parent
470492759c
commit
560609fbed
@ -17,23 +17,20 @@
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
("ACE_ATragMX" in (uniformItems ACE_player)) || {"ACE_ATragMX" in (vestItems ACE_player)}
|
||||
[] call FUNC(can_show);
|
||||
};
|
||||
_toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
false
|
||||
};
|
||||
// Statement
|
||||
[] call FUNC(create_dialog);
|
||||
false
|
||||
};
|
||||
_closeCode = {
|
||||
if (dialog && {!isNull (uiNamespace getVariable ["ATragMX_Display", displayNull])}) then {
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
};
|
||||
};
|
||||
|
||||
[(localize "STR_ACE_ATragMX_Name"), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
|
@ -25,6 +25,7 @@
|
||||
{false},
|
||||
[0, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
|
||||
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
@ -32,7 +33,7 @@ _conditonCode = {
|
||||
};
|
||||
_toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
|
||||
// Statement
|
||||
if (!GVAR(Overlay)) then {
|
||||
@ -44,9 +45,6 @@ _toggleCode = {
|
||||
};
|
||||
};
|
||||
_closeCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
if (GVAR(Overlay)) then {
|
||||
//If dispaly is open, close it:
|
||||
@ -57,7 +55,5 @@ _closeCode = {
|
||||
GVAR(Kestrel4500) = false;
|
||||
closeDialog 0;
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
[(localize "STR_ACE_Kestrel_Name"), QUOTE(PATHTOF(UI\Kestrel4500.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\Kestrel4500.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
|
@ -3,22 +3,18 @@ class CfgVehicles {
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(show) {
|
||||
//Opens the mini map
|
||||
displayName = CSTRING(show);
|
||||
condition = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(canShow));
|
||||
statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay));
|
||||
showDisabled = 0;
|
||||
priority = 0.2;
|
||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||
exceptions[] = {"notOnMap", "isNotInside"};
|
||||
class GVAR(configure) {
|
||||
//Opens the dialog
|
||||
displayName = CSTRING(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(UI\icon_microDAGR.paa));
|
||||
exceptions[] = {"notOnMap", "isNotInside"};
|
||||
class GVAR(show) {
|
||||
//Opens the mini map
|
||||
displayName = CSTRING(show);
|
||||
condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY});
|
||||
statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay));
|
||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||
exceptions[] = {"notOnMap", "isNotInside"};
|
||||
};
|
||||
@ -26,8 +22,6 @@ class CfgVehicles {
|
||||
displayName = CSTRING(closeUnit);
|
||||
condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED);
|
||||
statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay));
|
||||
showDisabled = 0;
|
||||
priority = 0.3;
|
||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||
exceptions[] = {"notOnMap", "isNotInside"};
|
||||
};
|
||||
|
@ -6,19 +6,18 @@ if (!hasInterface) exitWith {};
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
("ACE_microDAGR" in (items ace_player))
|
||||
("ACE_microDAGR" in (items ACE_player))
|
||||
};
|
||||
_toggleCode = {
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
[] call FUNC(openDisplay); //toggle display mode
|
||||
true
|
||||
};
|
||||
_closeCode = {
|
||||
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {false};
|
||||
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {};
|
||||
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay);
|
||||
true
|
||||
};
|
||||
[(localize "STR_ACE_microdagr_itemName"), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
[(localize LSTRING(itemName)), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
|
||||
|
||||
//Add Eventhandler:
|
||||
["RangerfinderData", {_this call FUNC(recieveRangefinderData)}] call EFUNC(common,addEventHandler);
|
||||
|
Loading…
Reference in New Issue
Block a user