Skip to content

GetScreenSize

The size of the space the elements live in.

The height is always 1080; the width follows the screen’s shape (1920 on a 16:9 screen, 2560 on 21:9). Read it when placing something against the right or the bottom edge - the answer changes with the window.

GetScreenSize()

number, number - the width and the height

local w, h = GetScreenSize()
CreateUiText("clock", w - 40, 20, "12:00", COLOR_GOLD, 0.8, UI_ALIGN_RIGHT)

WorldToScreen · the The game’s UI for a script group of the index