ACE3/addons/maptools/functions/fnc_calculateMapScale.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

22 lines
483 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: esteldunedain
* Returns the equivalent of 100m in screen coordinates
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ACE_maptools_fnc_calculateMapScale
*
* Public: No
*/
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