From 55529d03963416ba0051268ea2914202bf95eab6 Mon Sep 17 00:00:00 2001
From: Glowbal <thomasskooi@live.nl>
Date: Sat, 25 Apr 2015 09:41:55 +0200
Subject: [PATCH 1/3] 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 @@
             <Spanish>Aberración cromática</Spanish>
             <French>Aberration chromatique</French>
         </Key>
+        <Key ID="STR_ACE_Medical_menuTypeDisplay">
+            <English>Style of menu (Medical)</English>
+        </Key>
+        <Key ID="STR_ACE_Medical_menuTypeDescription">
+            <English>Select the type of menu you prefer; default 3d selections or radial.</English>
+        </Key>
+        <Key ID="STR_ACE_Medical_useSelection">
+            <English>Selections (3d)</English>
+        </Key>
+        <Key ID="STR_ACE_Medical_useRadial">
+            <English>Radial</English>
+        </Key>
+        
     </Package>
 </Project>
\ No newline at end of file

From 2f763a23101872f310f25f54a3ec5ef54bbdd125 Mon Sep 17 00:00:00 2001
From: Glowbal <thomasskooi@live.nl>
Date: Thu, 30 Apr 2015 21:17:33 +0200
Subject: [PATCH 2/3] Disabled client setting for menu style

---
 addons/medical/ACE_Settings.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp
index 36d882c9d8..453c6962d2 100644
--- a/addons/medical/ACE_Settings.hpp
+++ b/addons/medical/ACE_Settings.hpp
@@ -155,6 +155,6 @@ class ACE_Settings {
         typeName = "SCALAR";
         value = 0;
         values[] = {"$STR_ACE_Medical_useSelection", "$STR_ACE_Medical_useRadial"};
-        isClientSettable = 1;
+        // isClientSettable = 1;
     };
 };

From e7290feaa20c90afd5dbd6074a87722fd4e21584 Mon Sep 17 00:00:00 2001
From: Glowbal <thomasskooi@live.nl>
Date: Thu, 30 Apr 2015 21:20:04 +0200
Subject: [PATCH 3/3] disabled radial option, so it isn't server selectable
 either

---
 addons/medical/ACE_Settings.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp
index 453c6962d2..ef4a4f0162 100644
--- a/addons/medical/ACE_Settings.hpp
+++ b/addons/medical/ACE_Settings.hpp
@@ -154,7 +154,7 @@ class ACE_Settings {
         description = "$STR_ACE_Medical_menuTypeDescription";
         typeName = "SCALAR";
         value = 0;
-        values[] = {"$STR_ACE_Medical_useSelection", "$STR_ACE_Medical_useRadial"};
+        values[] = {"$STR_ACE_Medical_useSelection"/*, "$STR_ACE_Medical_useRadial"*/};
         // isClientSettable = 1;
     };
 };