ACE3/addons/atragmx/functions/fnc_update_target_data.sqf
ulteq 314b0d23d6 ATragMX Feature Expansion:
*Added Gun and Ammo Data Screen
*Added Atomospheric and Environmental Data Screen
*Added Target Data Screen
*Added support for coriolis- and spin drift
*Added a second option (AT) to enter atmospheric data
*Target data is now saved/restored in/from the profileNamespace
*Atmosphere data is now saved/restored in/from the profileNamespace
*Selected gun profile is now saved/restored in/from the profileNamespace
*Fixed several bugs in the dual-/imperial unit systems
*Minor bug fixes in the target range assist screen
*Minor bug fix in the target speed assist screen
2015-04-18 00:11:53 +02:00

41 lines
1.4 KiB
Plaintext

/*
* Author: Ruthberg
* Updates all target column input fields
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_update_target
*
* Public: No
*/
#include "script_component.hpp"
ctrlSetText [140000, Str(Round((GVAR(latitude) select GVAR(currentTarget)) * 100) / 100)];
ctrlSetText [140010, Str(Round((GVAR(directionOfFire) select GVAR(currentTarget)) * 100) / 100)];
ctrlSetText [140020, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)];
ctrlSetText [140021, Str(Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 100) / 100)];
ctrlSetText [140030, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))];
ctrlSetText [140040, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))];
ctrlSetText [140041, Str(floor(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100)];
ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)];
ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
if (GVAR(currentUnit) == 2) then {
ctrlSetText [14002, "Wind Speed (m/s)"];
ctrlSetText [14005, "Target Speed (m/s)"];
} else {
ctrlSetText [14002, "Wind Speed (mph)"];
ctrlSetText [14005, "Target Speed (mph)"];
};
if (GVAR(currentUnit) == 1) then {
ctrlSetText [14006, "Target Range (yards)"];
} else {
ctrlSetText [14006, "Target Range (meters)"];
};