mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Use vehicle eh to hide bar
This commit is contained in:
parent
948442fafb
commit
054831f370
@ -13,10 +13,13 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// - GVAR updating and initialization -----------------------------------------
|
||||
["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler;
|
||||
["visibleMap", {
|
||||
|
||||
private _fnc_showStaminaBar = {
|
||||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
||||
_staminaBarContainer ctrlShow (!visibleMap);
|
||||
}, true] call CBA_fnc_addPlayerEventHandler;
|
||||
_staminaBarContainer ctrlShow ((!visibleMap) && {(vehicle ACE_player) == ACE_player});
|
||||
};
|
||||
["visibleMap", _fnc_showStaminaBar, true] call CBA_fnc_addPlayerEventHandler;
|
||||
["vehicle", _fnc_showStaminaBar, true] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// - Duty factors -------------------------------------------------------------
|
||||
if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
|
||||
|
@ -13,11 +13,6 @@ params ["_stamina"];
|
||||
|
||||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
||||
|
||||
if ((vehicle ACE_player) != ACE_player) exitWith { // Hide when mounted
|
||||
_staminaBarContainer ctrlSetFade 1;
|
||||
_staminaBarContainer ctrlCommit 1;
|
||||
};
|
||||
|
||||
// - Size ---------------------------------------------------------------------
|
||||
// Shrink the container to cut off the image (other wise it would just get stretched)
|
||||
private _posAndSize = ctrlPosition _staminaBarContainer;
|
||||
|
Loading…
Reference in New Issue
Block a user