2016-10-08 10:55:30 +00:00
|
|
|
/*
|
|
|
|
* Author: Nou
|
|
|
|
* Update distance when rangefinder laser is on
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_laser_fnc_onLaserDesignatorDraw
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2016-05-30 16:37:03 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-10-08 10:55:30 +00:00
|
|
|
private _laserCode = ACE_player getVariable[QGVAR(code), ACE_DEFAULT_LASER_CODE];
|
|
|
|
if (!isNil "_laserCode") then {
|
2016-05-30 16:37:03 +00:00
|
|
|
__LaserDesignatorIGUI_LaserCode ctrlSetText format["Code: %1", [_laserCode, 4, 0, false] call CBA_fnc_formatNumber];
|
|
|
|
};
|
|
|
|
|
2016-10-08 10:55:30 +00:00
|
|
|
if (! (ctrlShown __LaserDesignatorIGUI_LaserOn) ) then {
|
2016-05-30 16:37:03 +00:00
|
|
|
// TODO: hide distance
|
|
|
|
__LaserDesignatorIGUI_ACE_Distance ctrlSetText "----";
|
|
|
|
} else {
|
|
|
|
__LaserDesignatorIGUI_ACE_Distance ctrlSetText (ctrlText __LaserDesignatorIGUI_CA_Distance);
|
2016-10-08 10:55:30 +00:00
|
|
|
};
|