2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-01-11 16:42:31 +00:00
|
|
|
* Returns the equivalent of 100m in screen coordinates
|
|
|
|
*
|
2015-04-07 20:01:44 +00:00
|
|
|
* Arguments:
|
2015-01-11 16:42:31 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return value:
|
2015-04-07 20:01:44 +00:00
|
|
|
* No
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-15 21:50:48 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-04-17 23:13:09 +00:00
|
|
|
private ["_screenOffset", "_pos"];
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
_pos = ((finddisplay 12) displayctrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
|
|
|
_screenOffset = ((finddisplay 12) displayctrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
|
|
|
|
|
|
|
|
(_screenOffset select 0) - 0.5
|