From 55529d03963416ba0051268ea2914202bf95eab6 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 25 Apr 2015 09:41:55 +0200 Subject: [PATCH] Added support for switching from 3d selections to radial menu --- addons/medical/ACE_Medical_Actions.hpp | 12 ++++++------ addons/medical/ACE_Settings.hpp | 9 +++++++++ addons/medical/CfgVehicles.hpp | 5 ++++- addons/medical/stringtable.xml | 13 +++++++++++++ 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/addons/medical/ACE_Medical_Actions.hpp b/addons/medical/ACE_Medical_Actions.hpp index ed5670f814..e3292105b0 100644 --- a/addons/medical/ACE_Medical_Actions.hpp +++ b/addons/medical/ACE_Medical_Actions.hpp @@ -3,7 +3,7 @@ class ACE_Head { displayName = "$STR_ACE_Interaction_Head"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); - condition = "true"; + ACTION_CONDITION EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -75,7 +75,7 @@ class ACE_Torso { displayName = "$STR_ACE_Interaction_Torso"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); - condition = "true"; + ACTION_CONDITION EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -175,7 +175,7 @@ class ACE_ArmLeft { displayName = "$STR_ACE_Interaction_ArmLeft"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); - condition = "true"; + ACTION_CONDITION EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -332,7 +332,7 @@ class ACE_ArmRight { displayName = "$STR_ACE_Interaction_ArmRight"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); - condition = "true"; + ACTION_CONDITION EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -486,7 +486,7 @@ class ACE_LegLeft { displayName = "$STR_ACE_Interaction_LegLeft"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); - condition = "true"; + ACTION_CONDITION EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; @@ -628,7 +628,7 @@ class ACE_LegRight { displayName = "$STR_ACE_Interaction_LegRight"; runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); - condition = "true"; + ACTION_CONDITION EXCEPTIONS icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index e7f60a14e8..c3531915db 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -143,4 +143,13 @@ class ACE_Settings { typeName = "BOOL"; value = 0; }; + + class GVAR(menuTypeStyle) { + displayName = "$STR_ACE_Medical_menuTypeDisplay"; + description = "$STR_ACE_Medical_menuTypeDescription"; + typeName = "SCALAR"; + value = 0; + values[] = {"$STR_ACE_Medical_useSelection", "$STR_ACE_Medical_useRadial"}; + isClientSettable = 1; + }; }; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 2b1f7c9468..648aa8e420 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -428,6 +428,7 @@ class CfgVehicles { class ACE_Actions { // Include actions in body parts for treatment while in the open #define EXCEPTIONS exceptions[] = {}; + #define ACTION_CONDITION condition = QUOTE(GVAR(menuTypeStyle) == 0); #include "ACE_Medical_Actions.hpp" // Create a consolidates medical menu for treatment while boarded @@ -436,12 +437,14 @@ class CfgVehicles { displayName = "$STR_ACE_MEDICAL_ACTIONS_Medical"; runOnHover = 1; exceptions[] = {"isNotInside"}; - condition = QUOTE(vehicle _target != _target); + condition = QUOTE(vehicle _target != _target || GVAR(menuTypeStyle) == 1); statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); icon = PATHTOF(UI\icons\medical_cross.paa); #undef EXCEPTIONS + #undef ACTION_CONDITION #define EXCEPTIONS exceptions[] = {"isNotInside"}; + #define ACTION_CONDITION condition = "true"; #include "ACE_Medical_Actions.hpp" }; class GVAR(loadPatient) { diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 53c587bec0..316425d6b4 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1635,5 +1635,18 @@ Aberración cromática Aberration chromatique + + Style of menu (Medical) + + + Select the type of menu you prefer; default 3d selections or radial. + + + Selections (3d) + + + Radial + + \ No newline at end of file