diff --git a/addons/medical_gui/functions/fnc_onMenuOpen.sqf b/addons/medical_gui/functions/fnc_onMenuOpen.sqf index e5d507907e..e77d92bddd 100644 --- a/addons/medical_gui/functions/fnc_onMenuOpen.sqf +++ b/addons/medical_gui/functions/fnc_onMenuOpen.sqf @@ -59,9 +59,25 @@ private _countEnabled = { if (_category isEqualType "") then { _x set [1, (GVAR(actions) findIf {_category == _x select 1}) > -1]; }; _x select 1 } count _list; -private _offsetX = POS_X(1.75) + 0.5 * (POS_X(12) - POS_X(_countEnabled * 1.5)); +private _offsetX = POS_X(1.5) + 0.5 * (POS_X(12.33) - POS_X(_countEnabled * 1.5) - POS_W(2 * 0.2)); +// 0.2 - divider gap size + +// Set divider position +private _ctrl = _display displayCtrl IDC_TRIAGE_DIVIDER; +_ctrl ctrlSetPositionX _offsetX + POS_W(1.5) + POS_W(0.085); // 0.085 = (0.2 - 0.03) / 2 +_ctrl ctrlCommit 0; + +_ctrl = _display displayCtrl IDC_TOGGLE_DIVIDER; +_ctrl ctrlSetPositionX _offsetX + POS_W(1.5*(_countEnabled - 1)) + POS_W(0.2) + POS_W(0.085); +_ctrl ctrlCommit 0; + { _x params ["_idc", "_enabled"]; + + if (_forEachIndex == 1 || {_forEachIndex == count _list - 1}) then { + _offsetX = _offsetX + POS_W(0.2); + }; + private _ctrl = _display displayCtrl _idc; if (_enabled) then { _ctrl ctrlSetPositionX _offsetX; diff --git a/addons/medical_gui/gui.hpp b/addons/medical_gui/gui.hpp index 872366ad24..58d98199f9 100644 --- a/addons/medical_gui/gui.hpp +++ b/addons/medical_gui/gui.hpp @@ -266,7 +266,7 @@ class ACE_Medical_Menu { text = QPATHTOF(data\categories\triage_card.paa); tooltip = CSTRING(ViewTriageCard); x = QUOTE(POS_X(1.75)); - y = QUOTE(POS_Y(2.73)); + y = QUOTE(POS_Y(2.75)); w = QUOTE(POS_W(1.5)); h = QUOTE(POS_H(1.5)); color[] = {1, 1, 1, 1}; @@ -324,6 +324,17 @@ class ACE_Medical_Menu { text = QPATHTOF(data\categories\toggle_to_other.paa); x = QUOTE(POS_X(12)); }; + class TriageDivider: HeaderLine { + idc = IDC_TRIAGE_DIVIDER; + x = QUOTE(POS_X(3.265)); + y = QUOTE(POS_Y(3.0)); + w = QUOTE(POS_W(0.03)); + h = QUOTE(POS_H(1.0)); + }; + class ToggleDivider: TriageDivider { + idc = IDC_TOGGLE_DIVIDER; + x = QUOTE(POS_X(3.265)); + }; class TriageCard: RscListBox { idc = IDC_TRIAGE_CARD; x = QUOTE(POS_X(1.5)); diff --git a/addons/medical_gui/script_component.hpp b/addons/medical_gui/script_component.hpp index 1887ed02a1..d69fb65434 100644 --- a/addons/medical_gui/script_component.hpp +++ b/addons/medical_gui/script_component.hpp @@ -46,6 +46,8 @@ #define IDC_ADVANCED 1350 #define IDC_DRAG 1360 #define IDC_TOGGLE 1370 +#define IDC_TRIAGE_DIVIDER 1380 +#define IDC_TOGGLE_DIVIDER 1390 #define IDC_TRIAGE_CARD 1400 #define IDC_INJURIES 1410