diff --git a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf
index 73ba6179a9..d73a6deb0d 100644
--- a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf
+++ b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf
@@ -25,10 +25,12 @@ _posAndSize set [2, _stamina * GVAR(staminaBarWidth)];
_staminaBarContainer ctrlSetPosition _posAndSize;
// - Opacity ------------------------------------------------------------------
-if (_stamina >= 0.8) then {
- _staminaBarContainer ctrlSetFade (0.9 + 0.1 * (_stamina - 0.8) / 0.2);
-} else {
- _staminaBarContainer ctrlSetFade (0.9 * _stamina / 0.8);
+if (GVAR(fadeStaminaBar)) then {
+ if (_stamina >= 0.8) then {
+ _staminaBarContainer ctrlSetFade (0.9 + 0.1 * (_stamina - 0.8) / 0.2);
+ } else {
+ _staminaBarContainer ctrlSetFade (0.9 * _stamina / 0.8);
+ };
};
// - Color --------------------------------------------------------------------
diff --git a/addons/advanced_fatigue/initSettings.sqf b/addons/advanced_fatigue/initSettings.sqf
index 4e44d75132..fa90aa9a4b 100644
--- a/addons/advanced_fatigue/initSettings.sqf
+++ b/addons/advanced_fatigue/initSettings.sqf
@@ -4,8 +4,14 @@
[LSTRING(Enabled), LSTRING(Enabled_Description)],
LSTRING(DisplayName),
true,
- true,
- {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
+ true, {
+ if (!_this) then {
+ private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
+ _staminaBarContainer ctrlSetFade 1;
+ _staminaBarContainer ctrlCommit 0;
+ };
+ [QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)
+ },
true // Needs mission restart
] call CBA_Settings_fnc_init;
@@ -24,6 +30,21 @@
}
] call CBA_Settings_fnc_init;
+[
+ QGVAR(fadeStaminaBar),
+ "CHECKBOX",
+ [LSTRING(FadeStaminaBar), LSTRING(FadeStaminaBar_Description)],
+ LSTRING(DisplayName),
+ true,
+ false, {
+ if (!_this && GVAR(enabled) && GVAR(enableStaminaBar)) then {
+ private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
+ _staminaBarContainer ctrlSetFade 0;
+ _staminaBarContainer ctrlCommit 0;
+ };
+ }
+] call CBA_Settings_fnc_init;
+
[
QGVAR(performanceFactor),
"SLIDER",
diff --git a/addons/advanced_fatigue/stringtable.xml b/addons/advanced_fatigue/stringtable.xml
index e7a6772a73..99f4c59f8b 100644
--- a/addons/advanced_fatigue/stringtable.xml
+++ b/addons/advanced_fatigue/stringtable.xml
@@ -223,5 +223,13 @@
Exibe a barra de estamina.
Zobrazuje lištu výdrže
+
+ Fade Stamina bar automatically
+ Blende Ausdauerleiste automatisch aus
+
+
+ Adjusts transparency of the bar based on stamina status.
+ Passt die Transparenz der Ausdauerleiste abhängig vom Ausdauerstatus an.
+