2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2021-10-05 16:47:24 +00:00
|
|
|
/*
|
|
|
|
* Author: veteran29
|
|
|
|
* Handles visual changes of the speed indicator.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* Current animation state <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* ["amovpercmtacslowwrfldf_ver2"] call ace_ui_fnc_handleSpeedIndicator
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_animState"];
|
|
|
|
|
|
|
|
if (!GVAR(enableSpeedIndicator)) exitWith {};
|
|
|
|
|
|
|
|
private _animSpeed = _animState select [9, 3];
|
|
|
|
private _isProne = _animState select [5, 3] isEqualTo "pne";
|
|
|
|
|
|
|
|
private _icon = GVAR(speedIndicatorIconHash) getOrDefault [[_animSpeed, _isProne], ""];
|
|
|
|
|
|
|
|
private _speedIndicator = uiNamespace getVariable [QGVAR(speedIndicator), controlNull];
|
|
|
|
_speedIndicator ctrlSetText _icon;
|