Returns the width of the screen for UI layout purposes. Measurements for layout are affected by the UI Scale setting (i.e. the uiscale CVar) and may not match actual screen pixels.


See also Video functions.

Signature:

screenWidth = GetScreenWidth()

Returns:

  • screenWidth - Width of the screen in layout pixels (number)