2015-09-18 07:38:19 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
2015-01-16 23:22:37 +00:00
|
|
|
*
|
2015-09-18 07:38:19 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: ID <NUMBER>
|
|
|
|
* 1: Show? <BOOL, NUMBER>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: Yes
|
2015-01-16 23:22:37 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-11 14:58:26 +00:00
|
|
|
if (!hasInterface) exitWith {};
|
2015-09-09 15:05:48 +00:00
|
|
|
|
2015-09-18 07:38:19 +00:00
|
|
|
params ["_id", ["_show", false]];
|
|
|
|
|
|
|
|
if (typeName _show == "SCALAR") then {
|
|
|
|
_show = _show == 1;
|
|
|
|
};
|
2015-01-16 23:22:37 +00:00
|
|
|
|
2015-05-14 18:02:42 +00:00
|
|
|
if (isNil QGVAR(SHOW_BLUR_SCREEN_COLLECTION)) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
GVAR(SHOW_BLUR_SCREEN_COLLECTION) = [];
|
2015-01-16 23:22:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
if (_show) then {
|
2015-09-18 07:38:19 +00:00
|
|
|
GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushBack _id;
|
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
// show blur
|
2015-11-30 16:22:16 +00:00
|
|
|
if (isNil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = ppEffectCreate ["DynamicBlur", 102];
|
|
|
|
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9];
|
|
|
|
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true;
|
|
|
|
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectCommit 0;
|
|
|
|
};
|
2015-01-16 23:22:37 +00:00
|
|
|
} else {
|
2015-04-06 16:22:43 +00:00
|
|
|
GVAR(SHOW_BLUR_SCREEN_COLLECTION) = GVAR(SHOW_BLUR_SCREEN_COLLECTION) - [_id];
|
2015-09-18 07:38:19 +00:00
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
if (GVAR(SHOW_BLUR_SCREEN_COLLECTION) isEqualTo []) then {
|
|
|
|
// hide blur
|
2015-09-18 07:38:19 +00:00
|
|
|
if (!isNil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
ppEffectDestroy GVAR(MENU_ppHandle_GUI_BLUR_SCREEN);
|
|
|
|
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = nil;
|
|
|
|
};
|
|
|
|
};
|
2015-02-14 19:06:55 +00:00
|
|
|
};
|