mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
4b42eb4385
* Merge ST Nightvision * Cleanup * Header cleanup * Add ace setting for fog * Cleanup debug * Manual merge refuel changes * Add new setting for effect scaling * Cleanup * Use ace_common_fnc_getZoom * Fix compat inheritance changes * Fix stringtable * Add category * Tidy function headers * Replace global event with remote event
32 lines
656 B
Plaintext
32 lines
656 B
Plaintext
/*
|
|
* Author: Dslyecxi, PabstMirror
|
|
* Determines night vision source (player/vehicle) - Updates UI based on type.
|
|
*
|
|
* Arguments:
|
|
* 0: Control <CONTROL>
|
|
* 1: Default position [x,y,w,h] <ARRAY>
|
|
* 2: Zoom Level <NUMBER>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [] call ace_nightvision_fnc_scaleCtrl
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_ctrl", "_default_pos", "_scale"];
|
|
|
|
if (!ctrlShown _ctrl) exitWith {};
|
|
|
|
_ctrl ctrlSetPosition
|
|
[(((_default_pos select 0) - 0.5) * _scale) + 0.5,
|
|
(((_default_pos select 1) - 0.5) * _scale) + 0.5,
|
|
(_default_pos select 2) * _scale,
|
|
(_default_pos select 3) * _scale];
|
|
|
|
|
|
_ctrl ctrlCommit 0;
|