ACE3/addons/maptools/functions/fnc_openMapGpsUpdate.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

32 lines
1015 B
Plaintext

/*
* Author: esteldunedain
* update gps display
*
* Arguments:
* Something
*
* Return Value:
* None
*
* Example:
* call ACE_maptools_fnc_openMapGpsUpdate
*
* Public: No
*/
#include "script_component.hpp"
if ((!("ItemGPS" in assigneditems ACE_player)) || {isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull])}) exitWith {
("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; // Close GPS RSC
[(_this select 1)] call CBA_fnc_removePerFrameHandler; // Remove frameHandler
};
disableSerialization;
private _mapGpsDisplay = uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull];
private _ctrl = _mapGpsDisplay displayCtrl 913590;
_ctrl ctrlSetText str (round (getDir ACE_player)); // Set Heading
_ctrl = _mapGpsDisplay displayCtrl 913591;
_ctrl ctrlSetText str (round ((getPosASL ACE_player) select 2) + EGVAR(common,mapAltitude)); // Set Altitude
_ctrl = _mapGpsDisplay displayCtrl 913592;
_ctrl ctrlSetText mapGridPosition ACE_player; // Set grid cords