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

@ -533,116 +533,125 @@ class RscTitles {
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 controls {
class BodyImage: GVAR(BodyImage) { class PatientInfoContainer: RscControlsGroupNoScrollbars {
x = safeZoneX + POS_W(2.25); idc = -1;
y = safeZoneY + POS_H(1.5); x = safeZoneX + PATIENT_INFO_IGUI_OFFSET_X;
w = POS_W(8.5); y = safeZoneY + PATIENT_INFO_IGUI_OFFSET_Y;
h = POS_H(8.5); w = safeZoneW;
class controls: controls { h = safeZoneH;
class Background: Background { class controls {
class BodyImage: GVAR(BodyImage) {
x = POS_W(2.25);
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 Background: Background {
w = POS_W(8.5);
h = POS_H(8.5);
};
class Head: Head {
w = POS_W(8.5);
h = POS_H(8.5);
};
class Torso: Torso {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmLeft: ArmLeft {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmRight: ArmRight {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegLeft: LegLeft {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegRight: LegRight {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmLeftB: ArmLeftB {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmRightB: ArmRightB {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegLeftB: LegLeftB {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegRightB: LegRightB {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmLeftT: ArmLeftT {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmRightT: ArmRightT {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegLeftT: LegLeftT {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegRightT: LegRightT {
w = POS_W(8.5);
h = POS_H(8.5);
};
};
}; };
class Head: Head { class InjuriesLabel: RscText {
w = POS_W(8.5); idc = -1;
h = POS_H(8.5); text = CSTRING(INJURIES);
x = POS_W(2);
y = POS_H(10.2);
w = POS_W(9);
h = POS_H(0.7);
sizeEx = POS_H(0.7);
colorBackground[] = GUI_BCG_COLOR;
}; };
class Torso: Torso { class Injuries: RscListBox {
w = POS_W(8.5); idc = IDC_INJURIES;
h = POS_H(8.5); x = POS_W(2);
y = POS_H(11);
w = POS_W(9);
h = POS_H(9);
sizeEx = POS_H(0.7);
colorSelect[] = {1, 1, 1, 1};
colorSelect2[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0.2};
colorSelectBackground[] = {0, 0, 0, 0};
colorSelectBackground2[] = {0, 0, 0, 0};
colorScrollbar[] = {0.9, 0.9, 0.9, 1};
}; };
class ArmLeft: ArmLeft { class TriageStatus: RscText {
w = POS_W(8.5); idc = IDC_TRIAGE_STATUS;
h = POS_H(8.5); x = POS_W(2);
y = POS_H(20.2);
w = POS_W(9);
h = POS_H(0.7);
sizeEx = POS_H(0.7);
shadow = 0;
}; };
class ArmRight: ArmRight { class Activity: Injuries {
w = POS_W(8.5); idc = IDC_ACTIVITY;
h = POS_H(8.5); x = POS_W(1.75);
}; y = POS_H(21);
class LegLeft: LegLeft { w = POS_W(15);
w = POS_W(8.5); h = POS_H(7);
h = POS_H(8.5); shadow = 2;
}; colorBackground[] = {0, 0, 0, 0};
class LegRight: LegRight {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmLeftB: ArmLeftB {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmRightB: ArmRightB {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegLeftB: LegLeftB {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegRightB: LegRightB {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmLeftT: ArmLeftT {
w = POS_W(8.5);
h = POS_H(8.5);
};
class ArmRightT: ArmRightT {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegLeftT: LegLeftT {
w = POS_W(8.5);
h = POS_H(8.5);
};
class LegRightT: LegRightT {
w = POS_W(8.5);
h = POS_H(8.5);
}; };
}; };
}; };
class InjuriesLabel: RscText {
idc = -1;
text = CSTRING(INJURIES);
x = safeZoneX + POS_W(2);
y = safeZoneY + POS_H(10.2);
w = POS_W(9);
h = POS_H(0.7);
sizeEx = POS_H(0.7);
colorBackground[] = GUI_BCG_COLOR;
};
class Injuries: RscListBox {
idc = IDC_INJURIES;
x = safeZoneX + POS_W(2);
y = safeZoneY + POS_H(11);
w = POS_W(9);
h = POS_H(9);
sizeEx = POS_H(0.7);
colorSelect[] = {1, 1, 1, 1};
colorSelect2[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0.2};
colorSelectBackground[] = {0, 0, 0, 0};
colorSelectBackground2[] = {0, 0, 0, 0};
colorScrollbar[] = {0.9, 0.9, 0.9, 1};
};
class TriageStatus: RscText {
idc = IDC_TRIAGE_STATUS;
x = safeZoneX + POS_W(2);
y = safeZoneY + POS_H(20.2);
w = POS_W(9);
h = POS_H(0.7);
sizeEx = POS_H(0.7);
shadow = 0;
};
class Activity: Injuries {
idc = IDC_ACTIVITY;
x = safeZoneX + POS_W(1.75);
y = safeZoneY + POS_H(21);
w = POS_W(15);
h = POS_H(7);
shadow = 2;
colorBackground[] = {0, 0, 0, 0};
};
}; };
}; };
}; };

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.