Advertisement
Spookygnu

monitorSetup.lua

Jan 21st, 2019
914
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.32 KB | None | 0 0
  1. _  = function(p) return p; end;
  2. name = _('3 Screen');
  3. Description = 'Configuration with 3 identical monitors each with its own camera'
  4. Viewports =
  5. {
  6.      Left =
  7.      {
  8.           x = 0;
  9.           y = 0;
  10.           width = screen.width / 3;
  11.           height = screen.height;
  12.           viewDx = -1;
  13.           viewDy = 0;
  14.           aspect = screen.aspect / 3;
  15.      },
  16.  
  17.      Center =
  18.      {
  19.           x = screen.width / 3;
  20.           y = 0;
  21.           width = screen.width / 3;
  22.           height = screen.height;
  23.           viewDx = 0;
  24.           viewDy = 0;
  25.           aspect = screen.aspect / 3;
  26.      },
  27.  
  28.      Right =
  29.      {
  30.           x = screen.width * 2 / 3;
  31.           y = 0;
  32.           width = screen.width / 3;
  33.           height = screen.height;
  34.           viewDx = 1;
  35.           viewDy = 0;
  36.           aspect = screen.aspect / 3;
  37.      }
  38. }
  39.  
  40.  
  41. UIMainView = Viewports.Center
  42. GU_MAIN_VIEWPORT = Viewports.Center
  43.  
  44. --[[
  45. also you can use "displays" table  to perfectly match you configuration .
  46. it is generated by DCS automatically.
  47. displays table is contains information about all currently attached displays
  48.  
  49. for example my setup is :
  50.  
  51. displays =
  52. {
  53.     [1] =
  54.     {
  55.         x = 0,   -- note : x == 0 and y == 0 is always mark primary windows display
  56.         y = 0,
  57.         width  = 1920,
  58.         height = 1200
  59.     },
  60.     [2] =
  61.     {
  62.         x = -1440,   -- mark that secondary display is on left side of primary display
  63.         y = 0,
  64.         width  = 1440,
  65.         height = 900
  66.     },
  67.     ...  for all displays
  68. }
  69.  
  70. screen table also contain x, y members which mark top left corner of DCS window
  71.  
  72. note about fullscreen :  directx  doesn't allow fullscreen applications with resolutions more than primary display can handle,
  73. so multimonitor presets in DCS will fall back to windowed mode if fullscreen initialization failed  ( this info also will be printed to dcs.log)
  74.  
  75. for reconfigure viewports setup for each unit type independently you can declare here function
  76.  
  77. function  reconfigure_for_unit(unit_type)   --unit type is string with unit name
  78.     if unit_type == "A-10C" then
  79.          
  80.         Viewports  = ... define new Viewports table
  81.         -- also you can define cockpit displays viewports here
  82.         RIGHT_MFCD = ... define new RIGHT_MFCD  viewport
  83.          
  84.     else
  85.         Viewports = ... define default for others
  86.         RIGHT_MFCD = nil  -- remove for others
  87.     end
  88. end
  89.  
  90. --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement