ACE3/addons/maptools/functions/fnc_calculateMapScale.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

22 lines
480 B
Plaintext

/*
* Author: esteldunedain
* Returns the equivalent of 100m in screen coordinates
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ACE_maptools_fnc_calculateMapScale
*
* Public: No
*/
#include "script_component.hpp"
private _pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
private _screenOffset = ((findDisplay 12) displayCtrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
(_screenOffset select 0) - 0.5