Medical - Add Patient Info to Layout Editor (#7745)

* Move GVAR(RscPatientInfo) contents into ControlsGroup

* Add CfgUIGrids for Medical PatientInfo

* Move Medical PatientInfo to Layout Editor position

* Uniform macro names

* Apply suggestions from code review

* Add IGUI category translation

* Update addons/medical_gui/stringtable.xml

Co-authored-by: Blutze <37950828+Blutze@users.noreply.github.com>

* Update addons/medical_gui/CfgUIGrids.hpp

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Remove redundant translations

Co-authored-by: Blutze <37950828+Blutze@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
Filip Maciejewski 2020-06-13 22:53:50 +02:00 committed by GitHub
parent 185c15de0e
commit 79ca6f5141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 152 additions and 101 deletions

View File

@ -0,0 +1,30 @@
class CfgUIGrids {
class IGUI {
class Presets {
class Arma3 {
class Variables {
GVAR(patientInfo)[] = {
{
PATIENT_INFO_IGUI_BASE_X,
PATIENT_INFO_IGUI_BASE_Y,
POS_W(9),
POS_H(20)
},
GUI_GRID_W,
GUI_GRID_H
};
};
};
};
class Variables {
class GVAR(patientInfo) {
displayName = ECSTRING(medical,Category);
description = CSTRING(IGUI_PatientInfo);
preview = QPATHTOF(ui\patient_info_preview_ca.paa);
saveToProfile[] = {0, 1};
canResize = 0;
};
};
};
};

View File

@ -14,6 +14,7 @@ class CfgPatches {
}; };
}; };
#include "CfgUIGrids.hpp"
#include "CfgEventHandlers.hpp" #include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"
#include "gui.hpp" #include "gui.hpp"

View File

@ -532,10 +532,17 @@ class RscTitles {
duration = 999999; duration = 999999;
movingEnable = 0; movingEnable = 0;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(RscPatientInfo), _this select 0)]); onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(RscPatientInfo), _this select 0)]);
class controls {
class PatientInfoContainer: RscControlsGroupNoScrollbars {
idc = -1;
x = safeZoneX + PATIENT_INFO_IGUI_OFFSET_X;
y = safeZoneY + PATIENT_INFO_IGUI_OFFSET_Y;
w = safeZoneW;
h = safeZoneH;
class controls { class controls {
class BodyImage: GVAR(BodyImage) { class BodyImage: GVAR(BodyImage) {
x = safeZoneX + POS_W(2.25); x = POS_W(2.25);
y = safeZoneY + POS_H(1.5); y = POS_H(1.5);
w = POS_W(8.5); w = POS_W(8.5);
h = POS_H(8.5); h = POS_H(8.5);
class controls: controls { class controls: controls {
@ -604,8 +611,8 @@ class RscTitles {
class InjuriesLabel: RscText { class InjuriesLabel: RscText {
idc = -1; idc = -1;
text = CSTRING(INJURIES); text = CSTRING(INJURIES);
x = safeZoneX + POS_W(2); x = POS_W(2);
y = safeZoneY + POS_H(10.2); y = POS_H(10.2);
w = POS_W(9); w = POS_W(9);
h = POS_H(0.7); h = POS_H(0.7);
sizeEx = POS_H(0.7); sizeEx = POS_H(0.7);
@ -613,8 +620,8 @@ class RscTitles {
}; };
class Injuries: RscListBox { class Injuries: RscListBox {
idc = IDC_INJURIES; idc = IDC_INJURIES;
x = safeZoneX + POS_W(2); x = POS_W(2);
y = safeZoneY + POS_H(11); y = POS_H(11);
w = POS_W(9); w = POS_W(9);
h = POS_H(9); h = POS_H(9);
sizeEx = POS_H(0.7); sizeEx = POS_H(0.7);
@ -627,8 +634,8 @@ class RscTitles {
}; };
class TriageStatus: RscText { class TriageStatus: RscText {
idc = IDC_TRIAGE_STATUS; idc = IDC_TRIAGE_STATUS;
x = safeZoneX + POS_W(2); x = POS_W(2);
y = safeZoneY + POS_H(20.2); y = POS_H(20.2);
w = POS_W(9); w = POS_W(9);
h = POS_H(0.7); h = POS_H(0.7);
sizeEx = POS_H(0.7); sizeEx = POS_H(0.7);
@ -636,8 +643,8 @@ class RscTitles {
}; };
class Activity: Injuries { class Activity: Injuries {
idc = IDC_ACTIVITY; idc = IDC_ACTIVITY;
x = safeZoneX + POS_W(1.75); x = POS_W(1.75);
y = safeZoneY + POS_H(21); y = POS_H(21);
w = POS_W(15); w = POS_W(15);
h = POS_H(7); h = POS_H(7);
shadow = 2; shadow = 2;
@ -646,3 +653,5 @@ class RscTitles {
}; };
}; };
}; };
};
};

View File

@ -27,6 +27,13 @@
#define POS_W(N) ((N) * GUI_GRID_W) #define POS_W(N) ((N) * GUI_GRID_W)
#define POS_H(N) ((N) * GUI_GRID_H) #define POS_H(N) ((N) * GUI_GRID_H)
#define PATIENT_INFO_IGUI_BASE_X (safeZoneX + POS_W(2))
#define PATIENT_INFO_IGUI_BASE_Y (safeZoneY + POS_H(1))
#define PATIENT_INFO_IGUI_X (profilenamespace getVariable ['TRIPLES(IGUI,GVAR(patientInfo),X)', 0])
#define PATIENT_INFO_IGUI_Y (profilenamespace getVariable ['TRIPLES(IGUI,GVAR(patientInfo),Y)', 0])
#define PATIENT_INFO_IGUI_OFFSET_X (PATIENT_INFO_IGUI_X - PATIENT_INFO_IGUI_BASE_X)
#define PATIENT_INFO_IGUI_OFFSET_Y (PATIENT_INFO_IGUI_Y - PATIENT_INFO_IGUI_BASE_Y)
#define IDD_MEDICAL_MENU 38580 #define IDD_MEDICAL_MENU 38580
#define IDC_TITLE 1200 #define IDC_TITLE 1200

View File

@ -1075,5 +1075,9 @@
<Turkish>Parsiyel %1</Turkish> <Turkish>Parsiyel %1</Turkish>
<Russian>Частичное %1</Russian> <Russian>Частичное %1</Russian>
</Key> </Key>
<Key ID="STR_ACE_Medical_GUI_IGUI_PatientInfo">
<English>Patient Info</English>
<Polish>Informacje o pacjencie</Polish>
</Key>
</Package> </Package>
</Project> </Project>

Binary file not shown.