2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2017-06-08 13:31:51 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Display <DISPLAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [DISPLAY] call ace_optics_fnc_onDrawScope
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-04-03 17:25:28 +00:00
|
|
|
disableSerialization;
|
|
|
|
|
2016-09-04 14:44:22 +00:00
|
|
|
params ["_display"];
|
2015-04-03 17:25:28 +00:00
|
|
|
|
2016-09-04 14:44:22 +00:00
|
|
|
private _control = _display displayCtrl 1713154;
|
2015-04-03 17:25:28 +00:00
|
|
|
|
|
|
|
if (!ctrlShown (_display displayCtrl 154)) exitWith {
|
2015-12-21 16:05:48 +00:00
|
|
|
_control ctrlShow false;
|
2015-04-03 17:25:28 +00:00
|
|
|
};
|
|
|
|
|
2017-08-29 22:47:01 +00:00
|
|
|
private _sizeX = (call EFUNC(common,getZoom)) / 4;
|
|
|
|
private _sizeY = _sizeX * safezoneW / safezoneH;
|
2015-04-03 17:25:28 +00:00
|
|
|
|
|
|
|
_control ctrlSetPosition [
|
2017-08-29 22:47:01 +00:00
|
|
|
safezoneX + 0.5 * safezoneW - 0.5 * _sizeX,
|
|
|
|
safezoneY + 0.5 * safezoneH - 0.5 * _sizeY,
|
2015-04-03 17:25:28 +00:00
|
|
|
_sizeX,
|
|
|
|
_sizeY
|
|
|
|
];
|
|
|
|
|
|
|
|
_control ctrlCommit 0;
|
|
|
|
_control ctrlShow true;
|