ACE3/addons/maptools/functions/fnc_calculateMapScale.sqf

22 lines
483 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
/*
2015-03-24 04:18:00 +00:00
* Author: esteldunedain
* Returns the equivalent of 100m in screen coordinates
*
2015-04-07 20:01:44 +00:00
* Arguments:
* None
*
2016-06-18 09:50:41 +00:00
* Return Value:
* None
*
* Example:
* call ACE_maptools_fnc_calculateMapScale
2015-04-07 20:01:44 +00:00
*
* Public: No
*/
2015-01-15 21:50:48 +00:00
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