mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
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:
parent
185c15de0e
commit
79ca6f5141
30
addons/medical_gui/CfgUIGrids.hpp
Normal file
30
addons/medical_gui/CfgUIGrids.hpp
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -14,6 +14,7 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgUIGrids.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "gui.hpp"
|
||||
|
@ -532,10 +532,17 @@ class RscTitles {
|
||||
duration = 999999;
|
||||
movingEnable = 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 BodyImage: GVAR(BodyImage) {
|
||||
x = safeZoneX + POS_W(2.25);
|
||||
y = safeZoneY + POS_H(1.5);
|
||||
x = POS_W(2.25);
|
||||
y = POS_H(1.5);
|
||||
w = POS_W(8.5);
|
||||
h = POS_H(8.5);
|
||||
class controls: controls {
|
||||
@ -604,8 +611,8 @@ class RscTitles {
|
||||
class InjuriesLabel: RscText {
|
||||
idc = -1;
|
||||
text = CSTRING(INJURIES);
|
||||
x = safeZoneX + POS_W(2);
|
||||
y = safeZoneY + POS_H(10.2);
|
||||
x = POS_W(2);
|
||||
y = POS_H(10.2);
|
||||
w = POS_W(9);
|
||||
h = POS_H(0.7);
|
||||
sizeEx = POS_H(0.7);
|
||||
@ -613,8 +620,8 @@ class RscTitles {
|
||||
};
|
||||
class Injuries: RscListBox {
|
||||
idc = IDC_INJURIES;
|
||||
x = safeZoneX + POS_W(2);
|
||||
y = safeZoneY + POS_H(11);
|
||||
x = POS_W(2);
|
||||
y = POS_H(11);
|
||||
w = POS_W(9);
|
||||
h = POS_H(9);
|
||||
sizeEx = POS_H(0.7);
|
||||
@ -627,8 +634,8 @@ class RscTitles {
|
||||
};
|
||||
class TriageStatus: RscText {
|
||||
idc = IDC_TRIAGE_STATUS;
|
||||
x = safeZoneX + POS_W(2);
|
||||
y = safeZoneY + POS_H(20.2);
|
||||
x = POS_W(2);
|
||||
y = POS_H(20.2);
|
||||
w = POS_W(9);
|
||||
h = POS_H(0.7);
|
||||
sizeEx = POS_H(0.7);
|
||||
@ -636,8 +643,8 @@ class RscTitles {
|
||||
};
|
||||
class Activity: Injuries {
|
||||
idc = IDC_ACTIVITY;
|
||||
x = safeZoneX + POS_W(1.75);
|
||||
y = safeZoneY + POS_H(21);
|
||||
x = POS_W(1.75);
|
||||
y = POS_H(21);
|
||||
w = POS_W(15);
|
||||
h = POS_H(7);
|
||||
shadow = 2;
|
||||
@ -646,3 +653,5 @@ class RscTitles {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -27,6 +27,13 @@
|
||||
#define POS_W(N) ((N) * GUI_GRID_W)
|
||||
#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 IDC_TITLE 1200
|
||||
|
@ -1075,5 +1075,9 @@
|
||||
<Turkish>Parsiyel %1</Turkish>
|
||||
<Russian>Частичное %1</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_IGUI_PatientInfo">
|
||||
<English>Patient Info</English>
|
||||
<Polish>Informacje o pacjencie</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
BIN
addons/medical_gui/ui/patient_info_preview_ca.paa
Normal file
BIN
addons/medical_gui/ui/patient_info_preview_ca.paa
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user