ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientScreenSizeChange

Event

onClientScreenSizeChange

ClientDrawing (dx)Trilogy Hub only

The game resolution or window size changed. Recompute interface positions then.

Handler

addEventHandler("onClientScreenSizeChange", root, function(width, height, oldWidth, oldHeight) ... end)

Parameters

widthint
New width.
heightint
New height.
oldWidthint
Old width.
oldHeightint
Old height.

Source

source is root.

Example

local sw, sh = guiGetScreenSize()
addEventHandler("onClientScreenSizeChange", root, function(w, h)
    sw, sh = w, h
end)

See also