2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-04-11 21:40:46 +00:00
|
|
|
/*
|
|
|
|
* Author: Ruthberg
|
|
|
|
* Shows and starts the target speed assist timer
|
|
|
|
*
|
|
|
|
* 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_target_speed_assist_timer
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-04-06 13:51:59 +00:00
|
|
|
|
2015-04-07 21:09:32 +00:00
|
|
|
if !(ctrlVisible 9000) then {
|
|
|
|
|
2015-04-11 12:51:40 +00:00
|
|
|
false call FUNC(show_target_speed_assist);
|
|
|
|
true call FUNC(show_target_speed_assist_timer);
|
2015-04-07 21:09:32 +00:00
|
|
|
|
2015-04-16 17:52:20 +00:00
|
|
|
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 9002);
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2015-04-10 13:02:45 +00:00
|
|
|
[{
|
2016-09-04 14:44:22 +00:00
|
|
|
params ["_args"];
|
|
|
|
_args params ["_startTime"];
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2015-04-10 13:02:45 +00:00
|
|
|
if (!(GVAR(speedAssistTimer))) exitWith {
|
|
|
|
GVAR(speedAssistTimer) = true;
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2016-03-02 10:01:39 +00:00
|
|
|
ctrlSetText [8006, Str(Round((CBA_missionTime - _startTime) * 10) / 10)];
|
2015-04-10 13:02:45 +00:00
|
|
|
|
|
|
|
[] call FUNC(calculate_target_speed_assist);
|
|
|
|
|
2015-04-11 12:51:40 +00:00
|
|
|
false call FUNC(show_target_speed_assist_timer);
|
|
|
|
true call FUNC(show_target_speed_assist);
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2015-11-30 15:45:20 +00:00
|
|
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
2015-04-10 13:02:45 +00:00
|
|
|
};
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2016-03-02 10:01:39 +00:00
|
|
|
ctrlSetText [9001, Str(Round((CBA_missionTime - _startTime) * 10) / 10)];
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2016-03-02 10:01:39 +00:00
|
|
|
}, 0.1, [CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
|
2015-04-06 13:51:59 +00:00
|
|
|
};
|