Update to this! I gave up on the original code and decided to use some of the auto-adjusting code. This worked out perfectly for the MFDs but I am unable to get the DED to show up. Do I have the right component name? Is there a way to check what the variable name is?
Code below:
_ = function(p) return p; end;
name = _('Custom');
Description = 'Camera on primary display and Left MFCD on secondary'
if displays and #displays > 1 then
primary =
{
x = displays[1].x - screen.x,
y = displays[1].y - screen.y,
width = displays[1].width,
height = displays[1].height,
aspect = displays[1].width/displays[1].height;
viewDx = 0;
viewDy = 0;
}
secondary =
{
x = displays[2].x - screen.x,
y = displays[2].y - screen.y,
width = displays[2].width / 2,
height = displays[2].height / 2,
}
RMFCD =
{
x = displays[2].x + displays[2].width / 2,
y = displays[2].y - screen.y,
width = displays[2].width / 2,
height = displays[2].height / 2,
}
F16_DED =
{
x = displays[2].x - screen.x,
y = displays[2].y + displays[2].height /2,
width = displays[2].width / 2,
height = displays[2].height / 2,
}
else
primary =
{
x = screen.width / 2;
y = 0;
width = screen.width / 2;
height = screen.height;
viewDx = 0;
viewDy = 0;
aspect = screen.aspect / 2;
}
secondary =
{
x = 0;
y = 0;
width = screen.width / 4;
height = screen.height / 2 ;
}
RMFCD =
{
x = screen.width / 4 * 3;
y = 0;
width = screen.width / 4;
height = screen.height / 2 ;
}
F16_DED =
{
x = 0;
y = screen.height / 2;
width = screen.width / 4;
height = screen.height / 2 ;
}
end
UIMainView = primary
GU_MAIN_VIEWPORT = primary
LEFT_MFCD = secondary
RIGHT_MFCD = RMFCD
F_16C_DED_ = F16_DED
Viewports = {UIMainView}
EDIT: Solved it!
Thread here
by adding
if not USE_DED then
--ViewportHandling
dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
update_screenspace_diplacement(1, true, 0)
try_find_assigned_viewport("F16_DED")
end
at the end of the DED_init.lua (at "...\Mods\aircraft\F-16C\Cockpit\Scripts\Displays\DED\indicator").
Thanks to Devrim!