Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circulation/GUI - Add ABG Setting #647

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/circulation/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class ACE_Medical_Treatment_Actions {
displayName = CSTRING(DrawArterial_Action_Use);
displayNameProgress = CSTRING(DrawBlood_Action_Progress);
treatmentTime = 10;
condition = QUOTE(GVAR(abgEnable));
callbackSuccess = QFUNC(drawArterial);
condition = "true";
items[] = {"kat_IV_16"};
};

Expand Down
10 changes: 10 additions & 0 deletions addons/circulation/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ if (isServer) then {
true
] call CBA_Settings_fnc_init;

// Enables ABG Menu and Testing
[
QGVAR(abgEnable),
"CHECKBOX",
[LLSTRING(SETTING_abg_enable), LLSTRING(SETTING_abg_enable_DESC)],
[CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)],
[false],
true
] call CBA_Settings_fnc_init;

//location for AED - Defi:
[
QGVAR(useLocation_AED),
Expand Down
6 changes: 6 additions & 0 deletions addons/circulation/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,12 @@
<Russian>Устанавливает группы крови, которые будут присвоены игрокам на основе их Steam ID \nГруппы крови разделены запятой (","), список должен содержать в общей сложности 10 групп крови</Russian>
<Dutch>Bepaald de bloedgroepen die aan spelers worden gegeven op basis van hun SteamID. \nBloedgroepen zijn gescheiden met een comma(","). De lijst moet 10 verschillende bloedgroepen bevatten</Dutch>
</Key>
<Key ID="STR_KAT_Circulation_SETTING_abg_enable">
<English>Enable ABG Testing</English>
</Key>
<Key ID="STR_KAT_Circulation_SETTING_abg_enable_DESC">
<English>Enables ABG Testing and ACE Menu Visibility</English>
</Key>
<Key ID="STR_KAT_Circulation_bloodtype_log">
<English>%1 checked dogtags blood group: %2</English>
<German>%1 hat die Blutgruppe der Erkennungsmarke überprüft: %2</German>
Expand Down
4 changes: 4 additions & 0 deletions addons/gui/functions/fnc_onMenuOpen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ if (EGVAR(pharma,RequireInsIV) && EGVAR(pharma,IVflowControl)) then {
(_display displayCtrl IDC_IV_FLOW_SHOWBUTTON) ctrlShow true;
};

if (EGVAR(circulation,abgEnable)) then {
(_display displayCtrl IDC_TEST_SHOWBUTTON) ctrlShow true;
};

// Set toggle button icon and tooltip
private _ctrl = _display displayCtrl IDC_TOGGLE;
if (ACEGVAR(medical_gui,target) == ACE_player) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/gui/functions/fnc_updateABGStatus.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ if (_ABGmenuShow) then {
};
};

} forEach [IDC_TEST_PACO2, IDC_TEST_PAO2, IDC_TEST_SPO2, IDC_TEST_HCO3, IDC_TEST_PH];
} forEach [IDC_TEST_PACO2, IDC_TEST_PAO2, IDC_TEST_SPO2, IDC_TEST_HCO3, IDC_TEST_PH];
5 changes: 3 additions & 2 deletions addons/gui/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class ACE_Medical_Menu {
y = QUOTE(POS_Y(1.1));
w = QUOTE(POS_W(9));
h = QUOTE(POS_H(3.3));
show = 0;
};
class ABGTitle: IVFlowTitle {
idc = IDC_ABG_TITLE; // LOOK HERE
Expand All @@ -144,7 +145,7 @@ class ACE_Medical_Menu {
y = QUOTE(POS_Y(0));
w = QUOTE(POS_W(9));
h = QUOTE(POS_H(1));
show = 1;
show = 0;
class Attributes {
color = "#E5E5E5";
font = "RobotoCondensed";
Expand Down Expand Up @@ -535,7 +536,7 @@ class ACE_Medical_Menu {
y = QUOTE(POS_Y(0));
w = QUOTE(POS_W(4.2));
h = QUOTE(POS_H(1));
show = 1;
show = 0;
colorBackground[] = {0, 0, 0, 0};
colorBackgroundActive[] = {1, 1, 1, 0.4};
colorBackgroundDisabled[] = {0, 0, 0, 0};
Expand Down
2 changes: 1 addition & 1 deletion addons/gui/gui_defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@

#define IDC_TEST_SHOWBUTTON 71208

#define IDC_ABG_BACKGROUND 71299
#define IDC_ABG_BACKGROUND 71299
Loading