ACE3/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf
Josuan Albin de828a2997 Parachute - Fix "hide altimeter" setting (#6721)
* Fix hide altimeter setting not working

Signed-off-by: Josuan Albin <josuanalbin@outlook.fr>

* Clean up altimeter PFH

* Put ! back inside
2018-12-06 16:36:35 -06:00

40 lines
936 B
Plaintext

#include "script_component.hpp"
/*
* Author: commy2
* Hides the height and velocity display while freefalling or parachuting on higher difficulties.
*
* Arguments:
* Stuff from infoDisplayChanged eventhandler. <UNKNOWN>
*
* Return Value:
* None
*
* Example:
* [?] call ACE_parachute_fnc_handleInfoDisplayChanged
*
* Public: No
*/
params ["_dialog", "_type"];
// don't do anything in noob mode
if (!GVAR(hideAltimeter)) exitWith {};
switch (_type) do {
case ("Parachute"): {
{
(_dialog displayCtrl _x) ctrlShow false;
} forEach [121, 122, 1004, 1005, 1006, 1014];
};
case ("Soldier"): {
{
private _control = (_dialog displayCtrl _x);
// these reset ctrlShow every frame by the engine. Set height/width to 0 as work around.
_control ctrlSetPosition [0,0,0,0];
_control ctrlCommit 0;
} forEach [380, 382];
};
};