ACE3/addons/optics/functions/fnc_onDrawScope.sqf

40 lines
690 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
/*
* 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;
params ["_display"];
2015-04-03 17:25:28 +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
};
private _sizeX = (call EFUNC(common,getZoom)) / 4;
private _sizeY = _sizeX * safezoneW / safezoneH;
2015-04-03 17:25:28 +00:00
_control ctrlSetPosition [
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;