From 5d6c518dd62a44ec46289ea98467fd48b4f68ff1 Mon Sep 17 00:00:00 2001 From: diwako Date: Wed, 13 Feb 2019 18:24:22 +0100 Subject: [PATCH] Fix for ace nvg layering ontop of ui elements --- mod/functions/fn_cacheLoop.sqf | 8 ++++---- mod/functions/fn_compass.sqf | 2 +- mod/functions/fn_postInit.sqf | 7 +++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/mod/functions/fn_cacheLoop.sqf b/mod/functions/fn_cacheLoop.sqf index 89bf4e2..9d708fe 100644 --- a/mod/functions/fn_cacheLoop.sqf +++ b/mod/functions/fn_cacheLoop.sqf @@ -8,7 +8,7 @@ if !(diwako_dui_enable_compass || diwako_dui_namelist) exitWith { for "_i" from 0 to (count diwako_dui_namebox_lists) do { ctrlDelete ctrlParentControlsGroup (diwako_dui_namebox_lists deleteAt 0); }; - ("diwako_dui_namebox" call BIS_fnc_rscLayer) cutRsc ["diwako_dui_RscNameBox","PLAIN", 0, true]; + "diwako_dui_compass" cutRsc ["diwako_dui_RscCompass","PLAIN", 0, false]; }; private _player = [] call CBA_fnc_currentUnit; @@ -70,7 +70,7 @@ if (diwako_dui_enable_compass) then { private _compassDisplay = uiNamespace getVariable ["diwako_dui_RscCompass", displayNull]; if (diwako_dui_compass_pfHandle <= -1 || {isNull _compassDisplay}) then { [diwako_dui_compass_pfHandle] call CBA_fnc_removePerFrameHandler; - ("diwako_dui_compass" call BIS_fnc_rscLayer) cutRsc ["diwako_dui_RscCompass","PLAIN", 0, true]; + "diwako_dui_compass" cutRsc ["diwako_dui_RscCompass","PLAIN", 0, false]; [] call diwako_dui_fnc_compass; }; @@ -126,7 +126,7 @@ if (diwako_dui_enable_compass) then { private _display = uiNamespace getVariable ["diwako_dui_RscNameBox", displayNull]; if (isNull _display) exitWith { if (diwako_dui_namelist) then { - ("diwako_dui_namebox" call BIS_fnc_rscLayer) cutRsc ["diwako_dui_RscNameBox","PLAIN", 0, true]; + "diwako_dui_namebox" cutRsc ["diwako_dui_RscNameBox","PLAIN", 0, false]; _display = uiNamespace getVariable ["diwako_dui_RscNameBox", displayNull]; }; }; @@ -140,7 +140,7 @@ if !(diwako_dui_namelist) exitWith { for "_i" from (count _lists) -1 to 0 step -1 do { ctrlDelete ctrlParentControlsGroup (_lists deleteAt _i); }; - ("diwako_dui_namebox" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; + "diwako_dui_namebox" cutText ["","PLAIN"]; }; }; diff --git a/mod/functions/fn_compass.sqf b/mod/functions/fn_compass.sqf index d6cfdcf..f6f62d5 100644 --- a/mod/functions/fn_compass.sqf +++ b/mod/functions/fn_compass.sqf @@ -18,7 +18,7 @@ diwako_dui_compass_pfHandle = [{ if !(diwako_dui_enable_compass) exitWith { [_pfhHandle] call CBA_fnc_removePerFrameHandler; - ("diwako_dui_compass" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; + "diwako_dui_compass" cutText ["","PLAIN"]; diwako_dui_compass_pfHandle = -1; }; diff --git a/mod/functions/fn_postInit.sqf b/mod/functions/fn_postInit.sqf index 09b97d3..6f5d20d 100644 --- a/mod/functions/fn_postInit.sqf +++ b/mod/functions/fn_postInit.sqf @@ -8,6 +8,13 @@ diwako_dui_windowHeightMod = linearConversion [1080,1440,getResolution # 1,1,0.7 diwako_dui_bearing_size_calc = diwako_dui_dir_size * diwako_dui_a3UiScale * diwako_dui_hudScaling * diwako_dui_windowHeightMod; diwako_dui_vehicleNamespace = [] call CBA_fnc_createNamespace; +if !(isNil "ace_nightvision") then { + "ace_nightvision_display" cutFadeOut 0; +}; + +"diwako_dui_compass" cutFadeOut 0; +"diwako_dui_namebox" cutFadeOut 0; + // start the loop [] call diwako_dui_fnc_cacheLoop;