#2750 - Update FCS display after distance adjust

This commit is contained in:
PabstMirror 2015-11-13 02:57:06 -06:00
parent 99852f2071
commit a621eaab24
2 changed files with 9 additions and 12 deletions

View File

@ -210,3 +210,11 @@ if(_playSound) then {
if(_showHint) then {
[format ["%1: %2", localize LSTRING(ZeroedTo), _distance]] call EFUNC(common,displayTextStructured);
};
//Update the hud's distance display to the new value or "----" if out of range
//(10m fudge because of EFUNC(common,getTargetDistance))
if ((_distance + 10) >= (getNumber (_turretConfig >> QGVAR(MaxDistance)))) then {
((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText "----";
} else {
((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber);
};

View File

@ -1,12 +1 @@
#define COMPONENT fcs
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_FCS
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_FCS
#define DEBUG_SETTINGS DEBUG_SETTINGS_FCS
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\fcs\script_component.hpp"