Jump to content

Recommended Posts

Posted (edited)

Here's what I suggest for the function "updateBounds" in StatusBarDialogue.lua.

It allows you to set your exact setting with regards to screen resolution, bezel adjustment and all.

 

Edited parts in bold

function updateBounds()

-- TODO: êîãäà â GUI ïîÿâÿòñÿ layouts ýòîò êîä ìîæíî áóäåò óáðàòü

-- local screenWidth, screenHeight = Gui.GetWindowSize()

local screenWidth = 1920

local screenHeight = 1080

local bezel = 150

 

local w, h = window:getSize()

 

-- window:setBounds(0, screenHeight - h, screenWidth, h)

window:setBounds(screenWidth + bezel, screenHeight - h, screenWidth, h)

 

local x, y, w, h = window.time:getBounds()

 

window.time:setPosition(screenWidth - w, y, w, h)

end

 

O.O.T, but this works equally well for the function "initialize" in CommandDialogsPanel.lua. It's the function that draws the comms on the top of the screen:

function initialize(self, menus, rootItem, dialogsData)

 

--UI

do

-- local screenWidth , screenHeight = Gui.GetWindowSize()

local screenWidth = 1920

local screenHeight = 1080

local bezel = 150

 

local height = 400

local window = DialogLoader.spawnDialogFromFile('Scripts/UI/RadioCommandDialogPanel/CommandDialogsPanel.dlg')

-- window:setBounds(0, 0, screenWidth, height)

window:setBounds(screenWidth + bezel, 0, screenWidth, height)

window:setVisible(true)

self.window = window

(the function goes on, but there are no changes there)

Edited by Quip
  • Like 2
Posted (edited)

if you're doing it for a Mod I suggest you the following:

local screenW1 = [x of screen 1]

local screenW2 = [x of screen 2]

local screenH2 = [y of screen 2]

local bezel = [bezel value]

 

And then in the functions:

for Status bar:

window:setBounds(screenW1 + bezel, screenH2 - h, screenW2, h)

for Dialogue box:

window:setBounds(screenW1 + bezel, 0, screenW2, height)

Edited by Quip
Posted

PeterP, question:

Why do you need these settings if you create a new viewport as you describe in your post here?

 

Once I had a new viewport created (with some modifications, see below) I - in fact - had to undo the changes to the two files above.

 

What we need is a simple tool in which you can enter your 3 screens' resolution, and your bevel compensation, and which creates a file for us to put into the folder MonitorSetup. Or am I missing something?

 

Changes in bold

_ = function(p) return p; end;

name = _('1 View-port and Gui for TH');

Description = '1 View-port and Gui for TH'

local centerScrX = 1920

local Bezel = 150

 

Viewports =

{

Center =

{

x = 0;

y = 0;

width = screen.width;

height = screen.height;

viewDx = 0;

viewDy = 0;

aspect = screen.aspect;

}

}

 

Gui =

{

x = centerScrX + Bezel; -- screen.width / 3;

y = 0;

width = centerScrX; -- screen.width / 3;

height = screen.height;

}

 

UIMainView = Gui

Posted

Don't worry ;).

 

I planned to look in which exact file/line these functions are controlled .

And than I just saw your posting at the same day. - and I wanted to say 'thanks', as you saved me some time to look/search for it myself - that's all.

:)

  • Like 1

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...