I’m finishing / adjusting a game, and i want to make it available for linux users too…
i’m trying to center a desktopcanvas on a window, after set the window fullscreen.
but, after do the fullscreen, the object does not center, because i can’t get the window width/height…
my method works on mac and windows
is there a trick to get this on linux?
the size of canvas, on IDE is 480 by 374
after window set to full screen, the “window size” is 512 by 384…
(but it is full screen, almost full hd // its on a VM)
How are you getting the size on Mac and Windows, which doesn’t work on Linux?
We hardly can guess what is failing on your side if we don’t know what you’re doing.
Thank you for having a Linux version in mind!
I’ve never had an issue with Window.height Window.Width. Is the VM in Fullscreen? Maybe it having an odd screen size / aspect ratio is causing some window math issues? Just a blind guess.
Public Sub centerThisControl(obj as DesktopUIControl, wdw as DesktopWindow)
obj.Left = (wdw.Width - obj.Width) / 2
obj.Top = (wdw.Height - obj.Height) / 2
End Sub
the size of canvas, on IDE is 480 by 374
after window set to full screen, the “window size” is 512 by 384…
(but it is full screen, almost full hd // its on a VM)
Linux always worked like this for me: Resized event firing like if it was Resizing event.
Maybe you can set Resizing if Windows/Mac and Resized if Linux to make them work similar?