Merge pull request #2842 from acemod/fcsUpdateDisplay

Update FCS display after distance adjust
This commit is contained in:
commy2 2015-11-23 16:34:09 +01:00
commit 3be60a2f6e
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"