mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 07:26:49 +01:00
display window on screen center
This commit is contained in:
@@ -8,8 +8,14 @@ function Client.init()
|
||||
if g_window.getPlatformType() == "X11-EGL" then
|
||||
g_window.setFullscreen(true)
|
||||
else
|
||||
g_window.move({ x=220, y=220 })
|
||||
g_window.resize({ width=800, height=480 })
|
||||
local size = { width = 1024,
|
||||
height = 768 }
|
||||
g_window.resize(size)
|
||||
|
||||
local displaySize = g_window.getDisplaySize()
|
||||
local pos = { x = (displaySize.width - size.width)/2,
|
||||
y = (displaySize.height - size.height)/2 }
|
||||
g_window.move(pos)
|
||||
end
|
||||
|
||||
g_window.setTitle('OTClient')
|
||||
|
||||
Reference in New Issue
Block a user