1
0
mirror of https://github.com/acemod/ACE3.git synced 2024-08-30 18:23:18 +00:00
ACE3/addons/bft_devices/functions/fnc_decBrightness.sqf

30 lines
594 B
Plaintext
Raw Normal View History

2018-10-04 14:43:06 +00:00
#include "script_component.hpp"
2016-09-03 07:35:37 +00:00
/*
* Author: Gundy
*
* Description:
* Decrease interface brightness
*
* Arguments:
* 0: Interface ID <STRING>
*
* Return Value:
* TRUE <BOOL>
*
* Example:
* ["interfaceID"] call ace_bft_devices_fnc_decBrightness;
*
* Public: No
*/
params ["_interfaceID"];
2018-01-31 23:08:07 +00:00
private _brightness = [_interfaceID, "brightness"] call FUNC(getSettings);
2016-09-03 07:35:37 +00:00
_brightness = _brightness - 0.1;
// make sure brightness is not larger than 0.5
if (_brightness < 0.5) then {_brightness = 0.5};
2018-01-31 23:08:07 +00:00
[_interfaceID, [["brightness",_brightness]]] call FUNC(setSettings);
2016-09-03 07:35:37 +00:00
true