ACE3/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf

29 lines
726 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
/*
* 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
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];
};
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);
};