2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-04-11 21:40:46 +00:00
|
|
|
/*
|
|
|
|
* Author: Ruthberg
|
|
|
|
* Updates all target column input fields
|
|
|
|
*
|
|
|
|
* Arguments:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-04-11 21:40:46 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-04-11 21:40:46 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* call ace_atragmx_fnc_update_target
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-04-06 13:51:59 +00:00
|
|
|
|
2015-04-18 13:08:54 +00:00
|
|
|
if (GVAR(showWind2)) then {
|
|
|
|
if (GVAR(currentUnit) != 2) then {
|
|
|
|
ctrlSetText [300, format["%1/%2", Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629), Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629)]];
|
|
|
|
} else {
|
|
|
|
ctrlSetText [300, format["%1/%2", Round(GVAR(windSpeed1) select GVAR(currentTarget)), Round(GVAR(windSpeed2) select GVAR(currentTarget))]];
|
|
|
|
};
|
2015-04-18 10:12:19 +00:00
|
|
|
} else {
|
2015-04-18 13:08:54 +00:00
|
|
|
if (GVAR(currentUnit) != 2) then {
|
|
|
|
ctrlSetText [300, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)];
|
|
|
|
} else {
|
|
|
|
ctrlSetText [300, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)];
|
|
|
|
};
|
2015-04-18 10:12:19 +00:00
|
|
|
};
|
2015-04-17 22:11:53 +00:00
|
|
|
ctrlSetText [310, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))];
|
|
|
|
ctrlSetText [320, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))];
|
2015-04-18 10:12:19 +00:00
|
|
|
if (GVAR(currentUnit) != 2) then {
|
|
|
|
ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)];
|
|
|
|
} else {
|
|
|
|
ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)];
|
|
|
|
};
|
2015-04-19 09:32:02 +00:00
|
|
|
switch (GVAR(currentUnit)) do {
|
|
|
|
case 0: {
|
|
|
|
ctrlSetText [340, format["*%1", Round((GVAR(targetRange) select GVAR(currentTarget)))]];
|
|
|
|
};
|
|
|
|
case 1: {
|
|
|
|
ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))];
|
|
|
|
};
|
|
|
|
case 2: {
|
|
|
|
ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
|
|
|
};
|
2015-04-18 10:12:19 +00:00
|
|
|
};
|