2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2017-06-08 13:31:51 +00:00
|
|
|
/*
|
|
|
|
* Author: esteldunedain
|
|
|
|
* update gps display
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* Something
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* call ACE_maptools_fnc_openMapGpsUpdate
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-16 08:13:29 +00:00
|
|
|
|
|
|
|
if ((!("ItemGPS" in assigneditems ACE_player)) || {isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull])}) exitWith {
|
2016-04-02 16:53:34 +00:00
|
|
|
("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; // Close GPS RSC
|
|
|
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler; // Remove frameHandler
|
2015-01-16 08:13:29 +00:00
|
|
|
};
|
|
|
|
disableSerialization;
|
|
|
|
|
2016-06-02 19:36:25 +00:00
|
|
|
private _mapGpsDisplay = uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull];
|
|
|
|
private _ctrl = _mapGpsDisplay displayCtrl 913590;
|
2016-04-02 16:53:34 +00:00
|
|
|
_ctrl ctrlSetText str (round (getDir ACE_player)); // Set Heading
|
2015-01-16 08:13:29 +00:00
|
|
|
_ctrl = _mapGpsDisplay displayCtrl 913591;
|
2016-04-02 16:53:34 +00:00
|
|
|
_ctrl ctrlSetText str (round ((getPosASL ACE_player) select 2) + EGVAR(common,mapAltitude)); // Set Altitude
|
2015-01-16 08:13:29 +00:00
|
|
|
_ctrl = _mapGpsDisplay displayCtrl 913592;
|
2016-04-02 16:53:34 +00:00
|
|
|
_ctrl ctrlSetText mapGridPosition ACE_player; // Set grid cords
|