mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e2ac18a05d
* advanced_ballistics * advanced_fatigue * advanced_throwing * ai * aircraft * arsenal * atragmx * attach * backpacks * ballistics * captives * cargo * chemlights * common * concertina_wire * cookoff * dagr * disarming * disposable * dogtags * dragging * explosives * fastroping * fcs * finger * frag * gestures * gforces * goggles * grenades * gunbag * hearing * hitreactions * huntir * interact_menu * interaction * inventory * kestrel4500 * laser * laserpointer * logistics_uavbattery * logistics_wirecutter * magazinerepack * map * map_gestures * maptools * markers * medical * medical_ai * medical_blood * medical_menu * microdagr * minedetector * missileguidance * missionmodules * mk6mortar * modules * movement * nametags * nightvision * nlaw * optics * optionsmenu * overheating * overpressure * parachute * pylons * quickmount * rangecard * rearm * recoil * refuel * reload * reloadlaunchers * repair * respawn * safemode * sandbag * scopes * slideshow * spectator * spottingscope * switchunits * tacticalladder * tagging * trenches * tripod * ui * vector * vehiclelock * vehicles * viewdistance * weaponselect * weather * winddeflection * yardage450 * zeus * arsenal defines.hpp * optionals * DEBUG_MODE_FULL 1 * DEBUG_MODE_FULL 2 * Manual fixes * Add SQF Validator check for #include after block comment * explosives fnc_openTimerUI * fix uniqueItems
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: commy2
|
|
* Animate scripted reticle of spotting scope.
|
|
*
|
|
* Arguments:
|
|
* 0: Reticles RSC info display <DISPLAY>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [DISPLAY] call ace_spottingscope_fnc_animateReticle
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
disableSerialization;
|
|
|
|
params ["_display"];
|
|
uinamespace setVariable [QGVAR(dlgSpottingScope), _display];
|
|
|
|
private _ctrlReticle = _display displayCtrl IDC_RETICLE;
|
|
private _ctrlBody = _display displayCtrl IDC_BODY;
|
|
private _ctrlBlackLeft = _display displayCtrl IDC_BLACK_LEFT;
|
|
private _ctrlBlackRight = _display displayCtrl IDC_BLACK_RIGHT;
|
|
|
|
// check if optics are used
|
|
// hide all controls otherwise
|
|
private _isUsingOptic = ctrlShown (_display displayCtrl 154);
|
|
|
|
_ctrlReticle ctrlShow _isUsingOptic;
|
|
_ctrlBody ctrlShow _isUsingOptic;
|
|
_ctrlBlackLeft ctrlShow _isUsingOptic;
|
|
_ctrlBlackRight ctrlShow _isUsingOptic;
|
|
|
|
// animate reticle
|
|
private _zoom = ([] call EFUNC(common,getZoom)) * MAGIC_SCOPE_NUMBER;
|
|
|
|
_ctrlReticle ctrlSetPosition [
|
|
POS_X_BASE(_zoom),
|
|
POS_Y_BASE(_zoom),
|
|
POS_W_BASE(_zoom),
|
|
POS_H_BASE(_zoom)
|
|
];
|
|
|
|
_ctrlReticle ctrlCommit 0;
|