2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2017-06-08 13:31:51 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Arguments:
|
2018-10-10 01:21:46 +00:00
|
|
|
* 0: Enable illumination <BOOL>
|
2017-06-08 13:31:51 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2018-10-10 01:21:46 +00:00
|
|
|
* [true] call ace_vector_fnc_illuminate
|
2017-06-08 13:31:51 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-04-12 11:56:01 +00:00
|
|
|
disableSerialization;
|
2016-09-04 14:44:22 +00:00
|
|
|
private _dlgVector = GETUVAR(ACE_dlgVector,displayNull);
|
2015-04-12 11:56:01 +00:00
|
|
|
|
|
|
|
if (_this select 0) then {
|
|
|
|
{
|
2019-05-27 15:46:07 +00:00
|
|
|
private _control = _dlgVector displayCtrl _x;
|
|
|
|
private _string = ctrlText _control;
|
|
|
|
private _index = _string find ".paa";
|
2015-04-12 11:56:01 +00:00
|
|
|
|
2019-05-27 15:46:07 +00:00
|
|
|
if (_index != -1 && {_string find "_illum.paa" == -1}) then {
|
|
|
|
_string = toArray _string;
|
|
|
|
_string resize _index;
|
2015-04-12 11:56:01 +00:00
|
|
|
|
2019-05-27 15:46:07 +00:00
|
|
|
_control ctrlSetText format ["%1_illum.paa", toString _string];
|
2015-04-12 11:56:01 +00:00
|
|
|
};
|
2019-05-27 15:46:07 +00:00
|
|
|
} forEach ILLUM_CONTROLS;
|
2015-04-12 11:56:01 +00:00
|
|
|
} else {
|
|
|
|
{
|
2019-05-27 15:46:07 +00:00
|
|
|
private _control = _dlgVector displayCtrl _x;
|
|
|
|
private _string = ctrlText _control;
|
|
|
|
private _index = _string find "_illum.paa";
|
2015-04-12 11:56:01 +00:00
|
|
|
|
2019-05-27 15:46:07 +00:00
|
|
|
if (_index != -1) then {
|
|
|
|
_string = toArray _string;
|
|
|
|
_string resize _index;
|
2015-04-12 11:56:01 +00:00
|
|
|
|
2019-05-27 15:46:07 +00:00
|
|
|
_control ctrlSetText format ["%1.paa", toString _string];
|
2015-04-12 11:56:01 +00:00
|
|
|
};
|
2019-05-27 15:46:07 +00:00
|
|
|
} forEach ILLUM_CONTROLS;
|
2015-04-12 11:56:01 +00:00
|
|
|
};
|