Skip to content

Commit

Permalink
Fix for ace nvg layering ontop of ui elements
Browse files Browse the repository at this point in the history
  • Loading branch information
diwako committed Feb 13, 2019
1 parent 350ef24 commit 5d6c518
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 4 additions & 4 deletions mod/functions/fn_cacheLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
};

Expand Down Expand Up @@ -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];
};
};
Expand All @@ -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"];
};
};

Expand Down
2 changes: 1 addition & 1 deletion mod/functions/fn_compass.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
7 changes: 7 additions & 0 deletions mod/functions/fn_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5d6c518

Please sign in to comment.